0 pts.
 Change Path of all Users’ home directory
I am migrating an old file server to a new file server, but I having difficulty coming up with a vbs script that will change the path of all the users' home directory within Active Directory. We are operating on Windows Server 2000. Does anyone have any idea of how to make a logon script to do this?

Software/Hardware used:
ASKED: August 8, 2005  11:18 AM
UPDATED: August 10, 2005  10:58 AM

Answer Wiki:
A-ha, foolishly using the profile section for home drives. Create an LDAP object: Set ObjUser = GetObject("LDAP://cn=auser,ou=users,dc=domain,dc=com"). Then you can .get for the homeDirectory or homeDrive so you should be able to do a .put. ObjUser.Put("homeDirectory", mystring). I've only done this on new users and I had end it with ObjUser.SetInfo whilst calling the puts. You should be able to see something relating to this in the MS Script Center if you search for "homedrive ldap". I'm going to do this soon. To get the logged on user's username (their cname) create a network object and get a string with the name from ObjNet.UserName. Stick that in your LDAP link. e.g ...cn=" & namestring & ",ou=us...
Last Wiki Answer Submitted:  August 8, 2005  12:32 pm  by  Cptrelentless   0 pts.
All Answer Wiki Contributors:  Cptrelentless   0 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


 

Thank you for your assistance. I created the LDAP object, but it still wasn’t mapping the drive. After a lot of research and consulting with other professionals, I added a script that would first remove the old home drive mapping, using the bForce and bUpdateProfile commands. Then I created the connection to new drive mapping. Thanks again.

 0 pts.