Export (0) Print
Expand All

Set-Contact

 

Applies to: Exchange Server 2007 SP3, Exchange Server 2007 SP2, Exchange Server 2007 SP1

Topic Last Modified: 2009-05-12

Use the Set-Contact cmdlet to modify the settings of an existing contact.


Set-Contact -Identity <ContactIdParameter> [-AllowUMCallsFromNonUsers <None | SearchEnabled>] [-AssistantName <String>] [-City <String>] [-Company <String>] [-Confirm [<SwitchParameter>]] [-CountryOrRegion <CountryInfo>] [-CreateDTMFMap <$true | $false>] [-Department <String>] [-DisplayName <String>] [-DomainController <Fqdn>] [-Fax <String>] [-FirstName <String>] [-HomePhone <String>] [-IgnoreDefaultScope <SwitchParameter>] [-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>] [-UseRusServer <String>] [-WebPage <String>] [-WhatIf [<SwitchParameter>]] [-WindowsEmailAddress <SmtpAddress>]


Set-Contact [-AllowUMCallsFromNonUsers <None | SearchEnabled>] [-AssistantName <String>] [-City <String>] [-Company <String>] [-Confirm [<SwitchParameter>]] [-CountryOrRegion <CountryInfo>] [-CreateDTMFMap <$true | $false>] [-Department <String>] [-DisplayName <String>] [-DomainController <Fqdn>] [-Fax <String>] [-FirstName <String>] [-HomePhone <String>] [-IgnoreDefaultScope <SwitchParameter>] [-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>] [-UseRusServer <String>] [-WebPage <String>] [-WhatIf [<SwitchParameter>]] [-WindowsEmailAddress <SmtpAddress>]

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.

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.

 

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:

  • GUID
  • Distinguished name (DN)
  • Canonical name
  • Name

The Identity parameter cannot be used if the Instance parameter is specified.

AllowUMCallsFromNonUsers

Optional

Microsoft.Exchange.Data.Directory.Recipient.AllowUMCallsFromNonUsersFlags

This parameter specifies whether to exclude the contact from directory searches.

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.

Confirm

Optional

System.Management.Automation.SwitchParameter

The Confirm parameter causes the command to pause processing and requires you to acknowledge what the command will do before processing continues. You don't have to specify a value with the Confirm parameter.

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.

IgnoreDefaultScope

Optional

System.Management.Automation.SwitchParameter

The IgnoreDefaultScope parameter instructs the command to ignore the default recipient scope setting for the Exchange Management Shell and use the entire forest as the scope. This allows the command to access Active Directory objects that are not currently in the default scope. Using the IgnoreDefaultScope parameter introduces the following restrictions:

  • You cannot use the DomainController parameter. The command will use an appropriate global catalog server automatically.
  • You can only use the DN for the Identity parameter. Other forms of identification, such as alias or GUID, are not accepted.

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 the following characters:

abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789\"()+,-./:?

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. 

UseRusServer

Optional

System.String

noteNote:
This parameter is available only in Exchange 2007 SP2.

The UseRusServer parameter instructs the command to use the specified Mailbox server on which the Address List service is running to obtain and then set mailbox and Active Directory user attributes.

The Address List service is a component in the Exchange System Attendant service. The Address List service creates and maintains Exchange-specific attribute values in Active Directory. You can use the Address List service to update recipient objects in a domain by using specific information, such as address list membership and e-mail addresses.

WebPage

Optional

System.String

The WebPage parameter defines the contact's Web page.

WhatIf

Optional

System.Management.Automation.SwitchParameter

The WhatIf parameter instructs the command to simulate the actions that it would take on the object. By using the WhatIf parameter, you can view what changes would occur without having to apply any of those changes. You don't have to specify a value with the WhatIf parameter.

WindowsEmailAddress

Optional

Microsoft.Exchange.Data.SmtpAddress

The WindowsEmailAddress parameter specifies the contact's e-mail address that is stored in Active Directory.

 

Error Description

 

 

 

Exceptions Description

 

 

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.
Set-Contact -Identity "contoso.com/Users/Ted Bremer" -City "Seattle" -Company "Contoso"
To ensure that you are reading the most up-to-date information and to find additional Exchange Server 2007 documentation, visit the Exchange Server TechCenter.
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft