Applies to: Exchange Server 2007
Topic Last Modified: 2007-06-17
Use the Set-Contact cmdlet to modify the settings of an existing contact.
Syntax
Set-Contact -Identity <ContactIdParameter>
[-AssistantName <String>] [-City <String>] [-Company
<String>] [-CountryOrRegion <CountryInfo>]
[-CreateDTMFMap <$true | $false>] [-Department
<String>] [-DisplayName <String>] [-DomainController
<Fqdn>] [-Fax <String>] [-FirstName <String>]
[-HomePhone <String>] [-Initials <String>] [-LastName
<String>] [-Manager <UserContactIdParameter>]
[-MobilePhone <String>] [-Name <String>] [-Notes
<String>] [-Office <String>] [-OtherFax
<MultiValuedProperty>] [-OtherHomePhone
<MultiValuedProperty>] [-OtherTelephone
<MultiValuedProperty>] [-Pager <String>] [-Phone
<String>] [-PhoneticDisplayName <String>] [-PostalCode
<String>] [-PostOfficeBox <MultiValuedProperty>]
[-SimpleDisplayName <String>] [-StateOrProvince
<String>] [-StreetAddress <String>]
[-TelephoneAssistant <String>] [-Title <String>]
[-UMDialPlan <UMDialPlanIdParameter>] [-UMDtmfMap
<MultiValuedProperty>] [-WebPage <String>]
|
Set-Contact [-AssistantName <String>] [-City
<String>] [-Company <String>] [-CountryOrRegion
<CountryInfo>] [-CreateDTMFMap <$true | $false>]
[-Department <String>] [-DisplayName <String>]
[-DomainController <Fqdn>] [-Fax <String>] [-FirstName
<String>] [-HomePhone <String>] [-Initials
<String>] [-Instance <Contact>] [-LastName
<String>] [-Manager <UserContactIdParameter>]
[-MobilePhone <String>] [-Name <String>] [-Notes
<String>] [-Office <String>] [-OtherFax
<MultiValuedProperty>] [-OtherHomePhone
<MultiValuedProperty>] [-OtherTelephone
<MultiValuedProperty>] [-Pager <String>] [-Phone
<String>] [-PhoneticDisplayName <String>] [-PostalCode
<String>] [-PostOfficeBox <MultiValuedProperty>]
[-SimpleDisplayName <String>] [-StateOrProvince
<String>] [-StreetAddress <String>]
[-TelephoneAssistant <String>] [-Title <String>]
[-UMDialPlan <UMDialPlanIdParameter>] [-UMDtmfMap
<MultiValuedProperty>] [-WebPage <String>]
|
Parameters
Parameter | Required | Type | Description |
---|---|---|---|
Identity |
Required |
Microsoft.Exchange.Configuration.Tasks.ContactIdParameter |
The Identity parameter specifies the object that you want to modify. The Identity parameter can take any of the following values for the contact object:
The Identity parameter cannot be used if the Instance parameter is specified. |
AssistantName |
Optional |
System.String |
The AssistantName parameter defines the name of the contact's assistant. |
City |
Optional |
System.String |
The City parameter defines the contact's city. |
Company |
Optional |
System.String |
The Company parameter defines the contact's company. |
CountryOrRegion |
Optional |
Microsoft.Exchange.Data.Directory.CountryInfo |
The CountryOrRegion parameter defines the contact's country or region. |
CreateDTMFMap |
Optional |
System.Boolean |
This parameter specifies that a dual tone multi-frequency (DTMF) map be created for the contact. |
Department |
Optional |
System.String |
The Department parameter defines the contact's department. |
DisplayName |
Optional |
System.String |
You can use the DisplayName parameter to specify the contact's name in the Exchange Management Console and in the Exchange global address list (GAL). DisplayName has meaning only for mail-enabled objects. |
DomainController |
Optional |
Microsoft.Exchange.Data.Fqdn |
To specify the fully qualified domain name (FQDN) of the domain controller that writes this configuration change to the Active Directory directory service, include the DomainController parameter. |
Fax |
Optional |
System.String |
The Fax parameter defines the contact's fax number. |
FirstName |
Optional |
System.String |
The FirstName parameter defines the contact's given name. |
HomePhone |
Optional |
System.String |
The HomePhone parameter defines the contact's home telephone number. |
Initials |
Optional |
System.String |
The Initials parameter defines the initials for the contact's name. |
Instance |
Optional |
Microsoft.Exchange.Data.Directory.Management.Contact |
The Instance parameter enables you to pass an entire object to the command to be processed. It is mainly used in scripts where an entire object must be passed to the command. The Instance parameter cannot be used if the Identity parameter is specified. |
LastName |
Optional |
System.String |
The LastName parameter defines the contact's surname. |
Manager |
Optional |
Microsoft.Exchange.Configuration.Tasks.UserContactIdParameter |
The Manager parameter defines the contact's manager. |
MobilePhone |
Optional |
System.String |
The MobilePhone parameter defines the contact's primary mobile phone number. |
Name |
Optional |
System.String |
The Name parameter specifies the contact's name in Active Directory Users and Computers, and also in the Group Name field in the Exchange Management Console if the group is mail-enabled. The Name value cannot exceed 64 characters. |
Notes |
Optional |
System.String |
The Notes parameter defines additional information about the contact. |
Office |
Optional |
System.String |
The Office parameter defines the contact's physical office name or number. |
OtherFax |
Optional |
Microsoft.Exchange.Data.MultiValuedProperty |
The OtherFax parameter defines the contact's alternative fax number. |
OtherHomePhone |
Optional |
Microsoft.Exchange.Data.MultiValuedProperty |
The OtherHomePhone parameter defines the contact's alternative home telephone number. |
OtherTelephone |
Optional |
Microsoft.Exchange.Data.MultiValuedProperty |
The OtherTelephone parameter defines the contact's alternative office telephone number. |
Pager |
Optional |
System.String |
The Pager parameter defines the contact's pager number. |
Phone |
Optional |
System.String |
The Phone parameter defines the contact's office telephone number. |
PhoneticDisplayName |
Optional |
System.String |
The PhoneticDisplayName parameter specifies a phonetic pronunciation of the DisplayName parameter. The maximum length of this parameter value is 255 characters. For more information about the PhoneticDisplayName parameter and speech recognition, see Understanding Automatic Speech Recognition Directory Lookups. |
PostalCode |
Optional |
System.String |
The PostalCode parameter defines the contact's postal code. |
PostOfficeBox |
Optional |
Microsoft.Exchange.Data.MultiValuedProperty |
The PostOfficeBox parameter defines the contact's post office box number. |
SimpleDisplayName |
Optional |
System.String |
The SimpleDisplayName parameter is used to display an alternative description of the object when only a limited set of characters is permitted. This limited set of characters consists of ASCII characters 26 through 126, inclusively. SimpleDisplayName has meaning only for mail-enabled objects. |
StateOrProvince |
Optional |
System.String |
The StateOrProvince parameter defines the contact's state or province. |
StreetAddress |
Optional |
System.String |
The StreetAddress parameter defines the contact's physical address. |
TelephoneAssistant |
Optional |
System.String |
The TelephoneAssistant parameter defines the telephone number of the contact's assistant. |
Title |
Optional |
System.String |
The Title parameter defines the contact's title. |
UMDialPlan |
Optional |
Microsoft.Exchange.Configuration.Tasks.UMDialPlanIdParameter |
This parameter specifies the directory object ID for the dial plan. |
UMDtmfMap |
Optional |
Microsoft.Exchange.Data.MultiValuedProperty |
This parameter specifies if you want to create a user-defined DTMF map for the UM-enabled contact. |
WebPage |
Optional |
System.String |
The WebPage parameter defines the contact's Web page. |
Detailed Description
You can use the Set-Contact cmdlet to modify the settings of contact objects that are visible in Active Directory Users and Computers. If the contact is mail-enabled, use the Set-MailContact cmdlet to modify the contact's e-mail settings that are not available by using the Set-Contact cmdlet. For more information about the Set-MailContact cmdlet, see Set-MailContact (RTM).
To run the Set-Contact cmdlet, the account you use must be delegated the following:
- Exchange Recipient Administrator role
- Account Operator role for the applicable Active Directory
containers
For more information about permissions, delegating roles, and the rights that are required to administer Exchange Server 2007, see Permission Considerations.
Input Types
Return Types
Errors
Error | Description |
---|---|
|
|
Exceptions
Exceptions | Description |
---|---|
|
|
Example
The following code example shows how to use the Set-Contact command to make the following changes to an existing contact who is named Ted Bremer in the Users container in the Active Directory domain that is named contoso.com:
- Change the City value to Seattle.
- Change the Company value to Contoso.
Copy Code | |
---|---|
Set-Contact -Identity "contoso.com/Users/Ted Bremer" -City "Seattle" -Company "Contoso" |