如何在Windows Server 2003中为新创build的域用户自动configuration漫游configuration文件path?

如何将Windows Server 2003设置为默认新创build的域用户,以configuration漫游configuration文件path?

假设我有path\ server \ profiles中存储的漫游configuration文件。 是否有一些关键或政策,我可以设置默认configuration文件path如下所示:

\服务器\configuration文件\ $用户名

没有我必须记得手动configuration每个新创build的用户的configuration文件path?

对于较旧的Windows XP / 2003系统,您可以创build几个模板帐户,并简单地复制模板。 当您复制帐户时,许多字段将以复制的值开始。 在你的模板中使用像%USERNAME%这样的variables而不是用户名。

另一个select是使用Powershell或VBScript脚本帐户创build。 看看有很多很好的脚本示例,它们会将帐户添加到目录并设置大多数选项。

对于Vista / Windows 2008计算机。 如果configuration文件将要漫游的计算机位于OU或可以应用组策略的组中,则可以设置每台计算机的漫游configuration文件path。

打开您的组策略编辑器并转到此处。

Computer Configuration \ Administrative Templates \ System/User Profiles \ Set roaming profile path for all users on this computer. 

如果使用像dsadd.exe这样的命令行工具,则可以为用户名字段指定通用variables。

 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:> 

可以使用特殊标记$ username $ (不区分大小写)将SAM帐户名称放在参数的值中。 例如,如果目标用户DN是CN = Jane Doe,CN = users,CN = microsoft,CN = com且SAM帐户名称属性是“janed”,则-hmdir参数可以具有以下replace:

-hmdir \ users \ $ username $ \ home