2

How do I setup Windows Server 2003 to default newly created domain users to be configured with a roaming profile path?

Let's say I have roaming profiles stored at the path \server\profiles. Is there some key or policy that I can set the default profile path to something like:

\server\profiles\$username

without me having to remember to configure the profile path for each newly created user manually?

arathorn
  • 305
  • 5
  • 12

2 Answers2

7

For older systems Windows XP/2003 you can create a couple Template accounts and simply copy the templates. When you copy the accounts many of the fields will start with the copied values. In your templates use variables like %USERNAME% instead of the username.

Another option is to script account creation with Powershell or vbscript. Look around there are many good examples of scripts that will add accounts to the directory and set most options.

For Vista/Windows 2008 computers. If the computers that profiles will be roaming on are in a OU or group that you can apply a Group Policy too then you can set the Roaming Profile Path per computer.

Open up your group policy editor and go to here.

Computer Configuration \ Administrative Templates \ System/User Profiles \ Set roaming profile path for all users on this computer.
Zoredache
  • 128,755
  • 40
  • 271
  • 413
0

If you use command line tool like dsadd.exe then you can specify the generic variable for username field.

C:\tools>dsadd user /?
Description:  Adds a user to the directory.
Syntax:  dsadd user <UserDN> [-samid <SAMName>] [-upn <UPN>] [-fn <FirstName>]
        [-mi <Initial>] [-ln <LastName>] [-display <DisplayName>]
        [-empid <EmployeeID>] [-pwd {<Password> | *}] [-desc <Description>]
        [-memberof <Group ...>] [-office <Office>] [-tel <Phone#>]
        [-email <Email>] [-hometel <HomePhone#>] [-pager <Pager#>]
        [-mobile <CellPhone#>] [-fax <Fax#>] [-iptel <IPPhone#>]
        [-webpg <WebPage>] [-title <Title>] [-dept <Department>]
        [-company <Company>] [-mgr <Manager>] [-hmdir <HomeDir>]
        [-hmdrv <DriveLtr:>] [-profile <ProfilePath>] [-loscr <ScriptPath>]
        [-mustchpwd {yes | no}] [-canchpwd {yes | no}]
        [-reversiblepwd {yes | no}] [-pwdneverexpires {yes | no}]
        [-acctexpires <NumDays>] [-disabled {yes | no}]
        [{-s <Server> | -d <Domain>}] [-u <UserName>]
        [-p {<Password> | *}] [-q] [{-uc | -uco | -uci}]

Parameters:

Value                   Description
<UserDN>                Required. Distinguished name (DN) of user to add.
                        If the target object is omitted, it will be taken
                        from standard input (stdin).
-samid <SAMName>        Set the SAM account name of user to <SAMName>.
                        If not specified, dsadd will attempt
                        to create SAM account name using up to
                        the first 20 characters from the
                        common name (CN) value of <UserDN>.
-upn <UPN>              Set the upn value to <UPN>.
-fn <FirstName>         Set user first name to <FirstName>.
-mi <Initial>           Set user middle initial to <Initial>.
-ln <LastName>          Set user last name to <LastName>.
-display <DisplayName>  Set user display name to <DisplayName>.
-empid <EmployeeID>     Set user employee ID to <EmployeeID>.
-pwd {<Password> | *}   Set user password to <Password>. If *, then you are
                        prompted for a password.
-desc <Description>     Set user description to <Description>.
-memberof <Group ...>   Make user a member of one or more groups <Group ...>
-office <Office>        Set user office location to <Office>.
-tel <Phone#>           Set user telephone# to <Phone#>.
-email <Email>          Set user e-mail address to <Email>.
-hometel <HomePhone#>   Set user home phone# to <HomePhone#>.
-pager <Pager#>         Set user pager# to <Pager#>.
-mobile <CellPhone#>    Set user mobile# to <CellPhone#>.
-fax <Fax#>             Set user fax# to <Fax#>.
-iptel <IPPhone#>       Set user IP phone# to <IPPhone#>.
-webpg <WebPage>        Set user web page URL to <WebPage>.
-title <Title>          Set user title to <Title>.
-dept <Department>      Set user department to <Department>.
-company <Company>      Set user company info to <Company>.
-mgr <Manager>          Set user's manager to <Manager> (format is DN).
-hmdir <HomeDir>        Set user home directory to <HomeDir>. If this is
                        UNC path, then a drive letter that will be mapped to
                        this path must also be specified through -hmdrv.
-hmdrv <DriveLtr:>      Set user home drive letter to <DriveLtr:>

The special token $username$ (case insensitive) may be used to place the SAM account name in the value of a parameter. For example, if the target user DN is CN=Jane Doe,CN=users,CN=microsoft,CN=com and the SAM account name attribute is "janed," the -hmdir parameter can have the following substitution:

-hmdir \users\$username$\home

KAPes
  • 994
  • 4
  • 12