Commands › Exchange Online

Set-Contact

Exchange Online ExchangeOnlineManagement Set-*

Modify contact object settings. If the contact is a mail contact, you can use the Set-MailContact cmdlet to modify other Microsoft Exchange settings that aren't available by using the Set-Contact cmdlet.

Quick start script

# Set-Contact — quick start (serv365.ai)
# 1. Connect (app-only shown; interactive: omit the certificate parameters)
Connect-ExchangeOnline -CertificateThumbprint $thumb -AppId $appId -Organization $org

# 2. Capture the current state first — you cannot roll back what you never recorded
$before = Get-Contact
$before | Format-List

# 3. Make the change (dry run first)
Set-Contact -Identity <ContactIdParameter> -WhatIf
Set-Contact -Identity <ContactIdParameter>

# 4. Verify and diff
$after = Get-Contact
Compare-Object ($before | Out-String) ($after | Out-String)

Syntax

Set-Contact [-Identity] <ContactIdParameter>
 [-AllowUMCallsFromNonUsers <AllowUMCallsFromNonUsersFlags>]
 [-AssistantName <String>]
 [-City <String>]
 [-Company <String>]
 [-Confirm]
 [-CountryOrRegion <CountryInfo>]
 [-CreateDTMFMap <Boolean>]
 [-Department <String>]
 [-DisplayName <String>]
 [-DomainController <Fqdn>]
 [-Fax <String>]
 [-FirstName <String>]
 [-GeoCoordinates <GeoCoordinates>]
 [-HomePhone <String>]
 [-IgnoreDefaultScope]
 [-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>]
 [-SeniorityIndex <Int32>]
 [-SimpleDisplayName <String>]
 [-StateOrProvince <String>]
 [-StreetAddress <String>]
 [-TelephoneAssistant <String>]
 [-Title <String>]
 [-UMCallingLineIds <MultiValuedProperty>]
 [-UMDtmfMap <MultiValuedProperty>]
 [-WebPage <String>]
 [-WhatIf]
 [-WindowsEmailAddress <SmtpAddress>]
 [<CommonParameters>]

Parameters (42)

ParameterTypeRequiredWhat it controls
-Identity ContactIdParameter yes The Identity parameter specifies the contact that you want to modify. You can use any value that uniquely identifies the contact. For example:
-AllowUMCallsFromNonUsers AllowUMCallsFromNonUsersFlags This parameter is available only in on-premises Exchange.
-AssistantName String The AssistantName parameter specifies the name of the contact's assistant.
-City String The City parameter specifies the contact's city.
-Company String The Company parameter specifies the contact's company.
-Confirm SwitchParameter The Confirm switch specifies whether to show or hide the confirmation prompt. How this switch affects the cmdlet depends on whether the cmdlet requires confirmation before proceeding.
-CountryOrRegion CountryInfo The CountryOrRegion parameter specifies the contact's country or region. A valid value is a valid ISO 3166-1 two-letter country code (for example, AU for Australia) or the corresponding friendly name for the country...
-CreateDTMFMap Boolean This parameter is available only in on-premises Exchange.
-Department String The Department parameter specifies the contact's department.
-DisplayName String The DisplayName parameter specifies the display name of the contact. The display name is visible in the Exchange admin center and in address lists. The maximum length is 256 characters. If the value contains spaces,...
-DomainController Fqdn This parameter is available only in on-premises Exchange.
-Fax String The Fax parameter specifies the contact's fax number.
-FirstName String The FirstName parameter specifies the user's first name.
-GeoCoordinates GeoCoordinates The GeoCoordinates parameter specifies the contact's location in latitude, longitude and (optionally) altitude coordinates. A valid value for this parameter uses one of the following formats:
-HomePhone String The HomePhone parameter specifies the contact's home telephone number.
-IgnoreDefaultScope SwitchParameter This parameter is available only in on-premises Exchange.
-Initials String The Initials parameter specifies the user's middle initials.
-LastName String The LastName parameter specifies the user's last name.
-Manager UserContactIdParameter The Manager parameter specifies the contact's manager.
-MobilePhone String The MobilePhone parameter specifies the contact's primary mobile phone number.
-Name String The Name parameter specifies the unique name of the contact. The maximum length is 64 characters. If the value contains spaces, enclose the value in quotation marks (").
-Notes String The Notes parameters specifies additional information about the object. If the value contains spaces, enclose the value in quotation marks (").
-Office String The Office parameter specifies the user's physical office name or number.
-OtherFax MultiValuedProperty The OtherFax parameter specifies the contact's alternative fax number.
-OtherHomePhone MultiValuedProperty The OtherHomePhone parameter specifies the contact's alternative home telephone number.
-OtherTelephone MultiValuedProperty The OtherTelephone parameter specifies the contact's alternative office telephone number.
-Pager String The Pager parameter specifies the contact's pager number.
-Phone String The Phone parameter specifies the contact's office telephone number.
-PhoneticDisplayName String The PhoneticDisplayName parameter specifies an alternate spelling of the user's name that's used for text to speech in Unified Messaging (UM) environments. Typically, you use this parameter when the pronunciation and...
-PostalCode String The PostalCode parameter specifies the contact's postal code.
-PostOfficeBox MultiValuedProperty The PostOfficeBox parameter specifies the contact's post office box number.
-SeniorityIndex Int32 The SeniorityIndex parameter specifies the order in which this contact displays in a hierarchical address book. A contact with a value of 2 displays higher in an address book than a contact with a value of 1.
-SimpleDisplayName String The SimpleDisplayName parameter is used to display an alternative description of the object when only a limited set of characters is permitted. Valid characters are:
-StateOrProvince String The StateOrProvince parameter specifies the contact's state or province.
-StreetAddress String The StreetAddress parameter specifies the contact's physical address.
-TelephoneAssistant String The TelephoneAssistant parameter specifies the telephone number of the contact's assistant.
-Title String The Title parameter specifies the contact's title.
-UMCallingLineIds MultiValuedProperty This parameter is available only in on-premises Exchange.
-UMDtmfMap MultiValuedProperty This parameter is available only in on-premises Exchange.
-WebPage String The WebPage parameter specifies the contact's web page.
-WhatIf SwitchParameter The WhatIf switch shows what the command does without making any changes. You don't need to specify a value with this switch.
-WindowsEmailAddress SmtpAddress The WindowsEmailAddress parameter specifies the Windows email address for this recipient. This is a common Active Directory attribute that's present in all environments, including environments without Exchange. Using...

Reference facts derived from Microsoft documentation, © Microsoft, licensed CC BY 4.0; restructured with original guidance by serv365.ai.