Hi, I have posted the script from here:
http://www.experts-exchang
but I have added the ability to specify a starting OU, which allows you to modify only users in that OU (and all subOUs).
It gives you a log as a CSV file of what changed.
Change these lines to suit....the user path will stay the same.
strOldPath = "\\server1\profiles\"
strNewPath = "\\server2\profiles\"
strOldHomeDirectory = "\\server1\user$\"
strNewHomeDirectory = "\\server2\user$\"
strOU = "OU=Users,OU=MainOffice,"
Regards,
Rob.
Main Topics
Browse All Topics





by: bluntTonyPosted on 2009-09-22 at 05:59:19ID: 25392257
Hi there,
ADModify would do this for you. It's got a nice GUI you can use, and it saves the changes so you can roll back if you make an error:
http://www.codeplex. com/admodi fy
You can use it to target individual OUs of users as well. See screenshot of what you would need to do.
Failing that, a VBscript example is below as well. Bear in mind you would need to change 'strBase' to the DN of the OU in question, e.g.
OU=someOU,DC=domain,DC =local
(and also the UNCs to the shares)
Hope this helps.
Select allOpen in new window
ADModify