• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1164
  • Last Modified:

Scripts to populate AD user information

Is there any script that can help me populate my user infomation in Active Directory with thier phone numbers?
I need to do this for about four thousand users and script would help. I have the current info in a text file.
Thanks
0
Caddo65590
Asked:
Caddo65590
3 Solutions
 
rindiCommented:
Use the ldifde command line tool. If you just enter ldifde you'll get a list with the syntax. I'm not 100% sure if the utility is a part of windows server or if you have to install the resource kit.
0
 
Seelan NaidooMicrosoft Systems AdminCommented:
Depends - Are you using Windows 2000 or 2003.

I you are using windows server 2003, then the dsmod command should do the trick..
You can also use dsquery and then use the results to populate AD using dsmod
0
 
neteducationCommented:
basically you can take any ldap-modify-utility, as AD is simply an LDAP-Directory
0
Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

 
Chris DentPowerShell DeveloperCommented:

What format is the text file in? If possible post a sample of the data.

Is the format the same throughout the text file?

Finally, please post which properties you are trying to populate in the User Account?
0
 
Caddo65590Author Commented:
All the user information is currently contained in a word document. The user data includes the following.
Full Addresses
Phone numbers and Faxes
Organizational Info. Title etc
We are using windows 2000 at the moment.
I hope this info helps gives a much clearer picture.
Thanks
0
 
Chris DentPowerShell DeveloperCommented:

A word document isn't going to help too much from a scripting perspective.

For this to be entered using any of the tools above or ADSI scripting the data needs to be in a pretty static format. A CSV file would be a good place to start because it is easily accessible and well structured (and a CSV is a text file).

Something like these columns in Excel (saved as CSV):

Full Name, Address1, Address2, Phone Number, Fax Number, Title, etc, etc

Giving something roughly like:

John Doe, IT Department, Building A, 0123456789, 0123456788, Director, etc, etc
Rachel Smith, Marketing Department, Building B, 0123456666, 0123456788, Director, etc, ec

A simple copy of the contents of the word document to a text file would also work, but the data still has to be predictable; a  static format.

Finally, something is needed to tie a specific record (group of details) to the account in AD - for instance, if your usernames are First Initial and Last Name then it wouldn't be too hard to generate the AD Username from the Full Name. From that point it would be pretty easy to add the data to the right field.

Basically, to script something to write the data in for you the data must be in a very predictable and accessible format. It must be possible to link the data in the sheet to an account in AD without requiring too much intelligence on the part of the script or any guesswork.
0
 
rindiCommented:
Why don't you just use

ldifde -m -f filename.txt

and your current AD will be output to the file "filename.txt"? You will then see how you should populate your file.
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now