We help IT Professionals succeed at work.

We've partnered with Certified Experts, Carl Webster and Richard Faulkner, to bring you a podcast all about Citrix Workspace, moving to the cloud, and analytics & intelligence. Episode 2 coming soon!Listen Now

x

Modify user telephone number field in Active Directory

MANNATEAM
MANNATEAM asked
on
Medium Priority
760 Views
Last Modified: 2012-08-13
I need an easy way to modify all my active directory user telephone number fields, their numbers ale all over the place and I need to make them a standard format as well as putting in the correct num
Comment
Watch Question

CERTIFIED EXPERT
Top Expert 2013

Commented:
ADModify is a good tool for bulk edits
http://www.codeplex.com/admodify
However in your situation if you need to change hundreds of numbers that are wrong then there really isn't a superfast way because you will still have to make sure every number is right for every user.
We had a similar issue the last place I was at.  In the end we had our users modify their own info (number, office #, location).   They were moving and changing offices and phones so much and we were never updated.
We used http://www.directory-update.com/
 Thanks
Mike
Chris DentPowerShell Developer
CERTIFIED EXPERT
Top Expert 2010

Commented:

Are the numbers the same for each user? If so, something like ADModify would seem appropriate.

If they numbers differ then that's not so good but it can be scripted easily. If you'd like to investigate that method you presumably have a list you'd like to import?

Chris

Author

Commented:
The numbers are all different so a bulk modify will not work unless it will allow importing from one source like excel and then using that information to update all the AD accounts.
Chris DentPowerShell Developer
CERTIFIED EXPERT
Top Expert 2010

Commented:

We can import from Excel, or preferably from a CSV file (less hassle).

What kind of details do you have in the Excel sheet? We need something that'll allow us to pick up the user account without too much trouble. Ideally a username, or e-mail address, although we can use first name and last name at a push.

Chris

Author

Commented:
I have found a program that will modify the field for me which is AD Bulk users by dovestone software.
what I need now is to export from AD the sAMAccountName to put into a file the program uses
I have tried with csvde but can't seem to get the syntax correct have any of you done this before?
Chris DentPowerShell Developer
CERTIFIED EXPERT
Top Expert 2010

Commented:

You only want the sAMAccountName?

If you have the Windows Support Tools installed this will drop those to a text file:

dsquery user | dsget user -samid > AFile.txt

Do you need more fields?

Chris

Author

Commented:
In order to update I need username (sAMAccountName and telephone number
CERTIFIED EXPERT
Top Expert 2013
Commented:
I like using adfind for this (the dsquery/dsget combo works too)
http://www.joeware.net/freetools/tools/adfind/index.htm
adfind -b dc=yourdomain,dc=com <or whatever your suffix is> -f  "&(objectcategory=person)(objectclass=user)" samaccountname telephonenumber -nodn   -csv  > c:\users.csv
That will dump the users samaccountname and phonenumber into a csv file on your C drive
Thanks
Mike

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.