Change Path of all Users’ home directory

0 pts.
Tags:
Active Directory
LDAP
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?
ASKED: August 8, 2005  11:18 AM
UPDATED: August 10, 2005  10:58 AM

Answer Wiki

Thanks. We'll let you know when a new response is added.

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…

Discuss This Question: 1  Reply

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • Fireball25
    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 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following