Link to home
Start Free TrialLog in
Avatar of techElefant73
techElefant73Flag for Switzerland

asked on

VBScript to create users in Windows 2008 Active Directory

I have a script that creates users from a .csv file in a Windows 2003 AD. If I run the same in test Windows 2008 AD on my VM Workstation, the script creates the user accounts, but returns errors when trying to set user properties.

If strlogin <> "" Then oUser.Put "mailNickname", strlogin
--> returns an error, that the "sepcified directory service attribute or value does not exist".
But when I use oUser.mailNickname, I get the value back correctly!

Anyone any ideas what changed from Windows 2003?
Avatar of Adam Brown
Adam Brown
Flag of United States of America image

Link to home
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of techElefant73


BINGO! When I take that out of the script, the user get created correctly and all properties set. If it's in, then all other properties can't be written anymore!

You get the points!

This question has been classified as abandoned and is being closed as part of the Cleanup Program. See my comment at the end of the question for more details.