Script to change profile and home directory path for all users
Hey guys I need some urgent help from you all. In my AD there are about 100 users whose profile path is set at \\dc\profile\username and their home directory path is set at \\dc\home\username. Now what i want to do is remove their Profile and Home Dorectory path from DC as it is taking huge space and put them on my Server. So I wanted to know how can I set up their profile path and home directory path for all users in AD to point at the new location (\\fileserver\profile\username) & (\\fileserver\home\username).
Now as I said there are 100 users it will be very difficult to do this manually for each user. Hence it will be very helpful if it can be done using a Script. Is there any script for the same? Please help.
Re: Script to change profile and home directory path for all users
Yes, there is a Script for changing the profile and home directory paths for users. By contrast, here is a script that should work. This script changes both the location of the home drive (the homeDirectory attribute) as well as the drive letter for the home drive (homeDrive). If all you want to do is remap the drive (that is, make the homeDrive drive X: rather than, say, drive Q:) then just leave out the line of code that assigns a value to homeDirectory:
Quote:
Set objUser = GetObject("LDAP://cn=Ken Myer,ou=finance,dc=fabrikam,dc=com")
objUser.Put "homeDirectory", "\\atl-fs-01\users\kenmyer"
objUser.Put "homeDrive", "X:"
objUser.SetInfo
for more info of the same, check this article: http://blogs.technet.com/b/heyscript...directory.aspx
RE: Script to change profile and home directory path for all users
Hey I have done this before and the best method I can suggest you is by creating a Saved Query with all users you want to change, then you can select them all at once and click properties. That will bring their common property, so that you can change all of them at once. You will not need to do it manually one by one for all 100 users, but all at once.
Re: Script to change profile and home directory path for all users
There several ways for doing the same. As above two users already suggested, apart from them there is a free tool as well from Microsoft directly. Just search Google with term admodify.net. You will find a handy gui way to do this. Alternatively you can also use command line by combining admod and adfind from joeware.net.