Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

HomeDirectory Problem when creating multiple AD Users from script

Status
Not open for further replies.

MRSOLO

Technical User
Jan 28, 2003
31
IE
Hello
I have created a vbs script to set up multiple users in Active Directory with inputs from a CSV file, by taking and modifying code from the microsoft technet website.

In the script I set the Home folder Profile settings to map the "X" drive to for example "\\Storage\User1$"

-Sample Code-
objStudent.Put "HomeDirectory", strHomeDir
objStudent.Put "HomeDrive", "X"
objStudent.SetInfo

This is as per the Microsoft instruction at the following link:

This appears to work fine it inputs the correct text into the correct fields in the User accounts profile page.

However when I log on as the newly created user, the drive is not mapped. I checked numerous things but if I just change the drive letter to Z or even delete the $ at the end and type it in again and reapply. the drive will be mapped next time I logon.
It is as if the settings are entered but not applied even though I have the "objstudent.setinfo" line in my code.

Has anyone seen a similar problem with setting correctly entered but not applied when using vbs scripts For Active Directory user setup.

Appreciate any help,
Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top