Script to change User Profile paths

Discussion in 'Server Migration' started by gram, Oct 3, 2007.

  1. gram

    gram Guest

    We need a script to change about 100 users profile paths in 2003 AD, instead
    of doing it manually.

    The only change is the servername, rest of path is ok.

    gram, Oct 3, 2007
    1. Advertisements

  2. Mathieu CHATEAU, Oct 3, 2007
    1. Advertisements

  3. Hello Gram,

    Thank you for using newsgroup!

    Based on my knowledge, AD users and computers WILL let you select multiple
    users and also let you select the properties of them, however it will not
    allow you to apply the changes for the users you select rather just one of
    the users. The work around is to create a script which will modify the
    profilepath attribute in AD

    I found the script already from Microsoft web site. Here is the sample
    script for reference:
    Set objUser = GetObject _
    ("LDAP://cn=MyerKen,ou=Management,dc=NA,dc=fabrika m,dc=com")

    strCurrentProfilePath = objUser.Get("profilePath")
    intStringLen = Len(strCurrentProfilePath)
    intStringRemains = intStringLen - 11
    strRemains = Mid(strCurrentProfilePath, 12, intStringRemains)
    strNewProfilePath = "\\fabrikam" & strRemains
    objUser.Put "profilePath", strNewProfilePath

    I'm sorry that we are unable to assist with this request in the newsgroups
    as the Partner Support newsgroups are geared towards break-fix scenarios.
    It appears that this is a development-related request that would be best
    addressed in the developer newsgroups. The developer newsgroups are located

    The support professionals there will be able to provide you with more
    efficient and suitable suggestions for your development-related needs. (I
    believe that they can provide you with better assistance for this kind of
    development-related issue.)

    For further assistance on this issue, you may also want to contact our
    Develop Support Services by telephone so that a dedicated Support
    Professional can assist you further with your request. To obtain the phone
    numbers for specific technology request please take a look at the web site
    listed below:;EN-US;PHONENUMBERS.

    Thanks & Regards,

    Ken Zhao

    Microsoft Online Support
    Microsoft Global Technical Support Center

    Get Secure! - <>
    When responding to posts, please "Reply to Group" via your newsreader so
    that others may learn and benefit from your issue.
    This posting is provided "AS IS" with no warranties, and confers no rights.

    | From: "gram" <>
    | Newsgroups:
    | Subject: Script to change User Profile paths
    | Date: Wed, 3 Oct 2007 15:29:03 +0100
    | X-Priority: 3
    | X-MSMail-Priority: Normal
    | X-Newsreader: Microsoft Outlook Express 6.00.3790.3959
    | X-RFC2646: Format=Flowed; Original
    | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.4073
    | Lines: 8
    | Message-ID: <4703a72f$0$7362$>
    | NNTP-Posting-Host:
    | X-Trace: 1191421743 7362
    | X-Complaints-To:
    | Path:
    | Xref: TK2MSFTNGHUB02.phx.gbl
    | X-Tomcat-NG:
    | We need a script to change about 100 users profile paths in 2003 AD,
    | of doing it manually.
    | The only change is the servername, rest of path is ok.
    | Regards
    Ken Zhao [MSFT], Oct 4, 2007
  4. Hello,

    how is it going ? Do you still need assistance ?
    Mathieu CHATEAU, Oct 8, 2007
  5. gram

    kj [SBS MVP] Guest

    Might be easier and quicker to use the combination of adfind and admod from
    kj [SBS MVP], May 10, 2010
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.