Using dsmod user
dsmod user modifies the attributes of users in Active Directory. dsmod.exe uses the following syntax. All syntax is explained in detail in Table 4.6.
dsmod user <UserDN ...> [-upn <UPN>] [-fn <FirstName>]
[-mi <Initial>] [-ln <LastName>] [-display <DisplayName>] [-empid <EmployeeID>] [-pwd {<Password> | *}] [-desc <Description>] [-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> | *}] [-c] [-q] [{-uc | -uco | -uci}]
|
Value |
Description |
|
<UserDN> |
Required. Distinguished names (DNs) of one or more users to modify. |
|
-upn <UPN> |
Sets the UPN value to <UPN>. |
|
-fn <FirstName> |
Sets user first name to <FirstName>. |
|
-mi <Initial> |
Sets user middle initial to <Initial>. |
|
-In <LastName> |
Sets user last name to <LastName>. |
|
-display <DispIayName> |
Sets user display name to <DisplayName>. |
|
-empid <EmpIoyeeID> |
Sets user employee ID to <EmployeeID>. |
|
-pwd {<Password> | *} |
Resets user password to<Password>. If *, then you are prompted for a password. |
|
-desc <Description> |
Sets user description to <Description>. |
|
-office <Office> |
Sets user office location to <Office>. |
|
-tel <Phone#> |
Sets user telephone# to <Phone#>. |
|
-email <EmaiI> |
Sets user e-mail address to <Email>. |
|
-hometel <HomePhone#> |
Sets user home phone# to <HomePhone#>. |
|
-pager <Pager#> |
Sets user pager# to <Pager#>. |
|
-mobile <CellPhone#> |
Sets user mobile# to <CellPhone#>. |
|
-fax <Fax#> |
Sets user fax# to <Fax#>. |
|
-iptel <IPPhone#> |
Sets user IP phone# to <IPPhone#>. |
|
-webpg <WebPage> |
Sets user Web page URL to <WebPage>. |
|
-title <Title> |
Sets user title to <Title>. |
|
-dept <Department> |
Sets user department to <Department>. |
|
-company <Company> |
Sets user company info to <Company>. |
|
-mgr <Manager> |
Sets user's manager to <Manager>. |
|
-hmdir <HomeDir> |
Sets user home directory to <HomeDir>. If this is UNC path, then a drive letter to be mapped to this path must also be specified through -hmdrv. |
|
-hmdrv <DriveLtr>: |
Sets user home drive letter to <DriveLtr>: |
|
-profile <ProfilePath> |
Sets user's profile path to <ProfilePath>. |
|
-loscr <ScriptPath> |
Sets user's logon script path to <ScriptPath>. |
|
-mustchpwd {yes | no} |
Sets whether the user must change his password (yes) or not (no) at his next logon. |
|
-canchpwd {yes | no} |
Sets whether the user can change his password (yes) or not (no). This setting should be "yes" if the -mustchpwd setting is "yes." |
|
Continued | |
Table 4.6 Understanding dsmod.exe user Syntax Value Description
-reversiblepwd {yes | no} Sets whether the user password should be stored using reversible encryption (yes) or not (no).
-pwdneverexpires Sets whether the user's password never expires (yes) or does
-acctexpires <NumDays> Sets user account to expire in <NumDays> days from today. A value of 0 sets expiration at the end of today. A positive value sets expiration in the future. A negative value sets expiration in the past. A string value of "never" sets the account to never expire.
Sets whether the user account is disabled (yes) or not (no).
-s <Server> connects to the domain controller (DC) with name <Server>. -d <Domain> connects to a DC in domain <Domain>. Default: a DC in the logon domain.
Connect as <UserName>. Default: the logged-on user. Username can be: username, domain\username, or user principal name (UPN).
Password for the user <UserName>. If *, then prompt for password.
Continuous operation mode. Reports errors but continues with next object in argument list when multiple target objects are specified. Without this option, the command exits on the first error.
Quiet mode: suppresses all output to standard output.
-uc Specifies that input from or output to pipe is formatted in Unicode. -uco Specifies that output to pipe or file is formatted in Unicode. -uci Specifies that input from pipe or file is formatted in Unicode.
Post a comment