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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Edit Home Folder for multiple users

Status
Not open for further replies.

SpectrumHS

IS-IT--Management
Apr 29, 2004
1
US
I'm looking for an easy way to edit the home foler location for about 300 users. We're adding a SnapServer for more storage and I'm going to move everyones folder there. Anyone know of a batch file out there for this?
Currently we connect to the H: drive and the home folder is located in \\titan\x_data\%username%
I'm looking to change this to \\snap\x_data\$username%

BTW - we're running W2Kserver w/ active directory
 
You could write a quick VB script that parsed AD (through ADSI) for all users in the User's OU, and updated the Home Directory value for each accordingly.

The AD value to update would be:

oUser.homeDirectory = "\\snap\x_data\%username%"

 
Batch file method after you've copied the folders over would probably be (needs testing):
Code:
(go to the x_data folder on \\snap)
dir/b/ad > dirlist.txt
for /f %%i in (dirlist.txt) do net user %%i /homedir:\\snap\x_data\%%i /domain
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top