Results 1 to 4 of 4

Thread: Script to change profile and home directory path for all users

  1. #1
    Join Date
    Oct 2006
    Posts
    28

    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.

  2. #2
    Join Date
    Dec 2005
    Posts
    945

    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:

    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

  3. #3
    Join Date
    Nov 2005
    Posts
    200

    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.

  4. #4
    Join Date
    Feb 2006
    Posts
    335

    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.

Similar Threads

  1. Active directory 2008 profile path permission
    By matzas in forum Networking & Security
    Replies: 1
    Last Post: 01-04-2011, 12:19 AM
  2. How to change or restore user profile path registry?
    By elldeegee in forum Operating Systems
    Replies: 2
    Last Post: 11-08-2009, 09:14 PM
  3. Strange user profile path change to C:\Documents and Settings\TEMP
    By NZSchoolTech in forum Windows Server Help
    Replies: 4
    Last Post: 28-02-2009, 02:53 PM
  4. Changing Profile Path and Home Folder with DSMod
    By AJ in forum Active Directory
    Replies: 5
    Last Post: 01-02-2008, 12:38 AM
  5. Change Local User Profile path after domain change
    By ptumelty in forum Windows Server Help
    Replies: 0
    Last Post: 11-09-2007, 10:36 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,711,635,119.96733 seconds with 17 queries