Share via


Dsmod contact

Applies To: Windows Server 2008

Modifies attributes of one or more existing contacts in the directory.

Dsmod is a command-line tool that is built into Windows Server 2008. It is available if you have the Active Directory Domain Services (AD DS) server role installed. To use dsmod, you must run the dsmod command from an elevated command prompt. To open an elevated command prompt, click Start, right-click Command Prompt, and then click Run as administrator.

For examples of how to use this command, see Examples.

Syntax

dsmod contact <ContactDN> ... [-fn <FirstName>] [-mi <Initial>] [-ln <LastName>] [-display <DisplayName>] [-desc <Description>] [-office <Office>] [-tel <PhoneNumber>] [-email <Email>] [-hometel <HomePhoneNumber>] [-pager <PagerNumber>] [-mobile <CellPhoneNumber>] [-fax <FaxNumber>] [-iptel <IPPhoneNumber>] [-title <Title>] [-dept <Department>] [-company <Company>] [{-s <Server> | -d <Domain>}] [-u <UserName>][-p {<Password> | *}] [-c] [-q] [{-uc | -uco | -uci}]

Parameters

Parameter Description

<ContactDN>

Required. Specifies the distinguished names of the contacts that you want to modify. If values are omitted, they are obtained through standard input (stdin) to support piping of output from another command to input of this command.

-fn <FirstName>

Specifies the first name of the contact that you want to modify.

-mi <Initial>

Specifies the middle initial of the contact that you want to modify.

-ln <LastName>

Specifies the last name of the contact that you want to modify.

-display <DisplayName>

Specifies the display name of the contact that you want to modify.

-desc <Description>

Specifies the description of the contact that you want to modify.

-office <Office>

Specifies the office location of the contact that you want to modify.

-tel <PhoneNumber>

Specifies the telephone number of the contact that you want to modify.

-email <Email>

Specifies the e-mail address of the contact that you want to modify.

-hometel <HomePhoneNumber>

Specifies the home telephone number of the contact that you want to modify.

-pager <PagerNumber>

Specifies the pager number of the contact that you want to modify.

-mobile <CellPhoneNumber>

Specifies the mobile number of the contact that you want to modify.

-fax <FaxNumber>

Specifies the fax number of the contact that you want to modify.

-iptel <IPPhoneNumber>

Specifies the IP phone number of the contact that you want to modify.

-title <Title>

Specifies the title of the contact that you want to modify.

-dept <Department>

Specifies the department of the contact that you want to modify.

-company <Company>

Specifies the company information of the contact that you want to modify.

{-s <Server> | -d <Domain>}

Connects a computer to a remote server or domain that you specify. By default, dsmod connects the computer to the domain controller in the logon domain.

-u <UserName>

Specifies the user name with which the user logs on to a remote server. By default, -u uses the user name with which the user logged on. You can use any of the following formats to specify a user name:

  • user name (for example, Linda)

  • domain\user name (for example, widgets\Linda)

  • user principal name (UPN) (for example, Linda@widgets.contoso.com)

-p {<Password> | *}

Specifies to use either a password or an asterisk (*) to log on to a remote server. If you type *, dsmod prompts you for a password.

-c

Reports errors, but continues with the next object in the argument list when you specify multiple target objects (continuous operation mode). If you do not supply this parameter, dsmod exits when the first error occurs.

-q

Suppresses all output to standard output (quiet mode).

{-uc | -uco | -uci}

Specifies that dsmod formats output or input data in Unicode. The following list explains each format.

  • -uc: Specifies a Unicode format for input from or output to a pipe (|).

  • -uco : Specifies a Unicode format for output to a pipe (|) or a file.

  • -uci: Specifies a Unicode format for input from a pipe (|) or a file.

/?

Displays help at the command prompt.

Remarks

  • If a value that you supply contains spaces, use quotation marks around the text, for example, "CN=Mike Danseglio,OU=Contacts,DC=Contoso,DC=Com".

  • If you supply multiple values for a parameter, use spaces to separate the values, for example, a list of distinguished names.

  • Dsmod does not support the addition of security principals in one forest to groups that are located in another forest when a forest trust is between both forests. You can use Active Directory Users and Computers to add security principals across a forest trust.

Examples

To set the company information of multiple contacts, type:

dsmod contact "CN=Mike Danseglio,OU=Contacts,DC=Contoso,DC=Com" "CN=Denise Smith,OU=Contacts,DC=Contoso,DC=Com" -company Contoso

Additional references

Command-Line Syntax Key

Dsmod

Dsmod computer

Dsmod group

Dsmod ou

Dsmod server

Dsmod user

Dsmod quota

Dsmod partition