Commands › Exchange Online

Set-ExchangeServer

Exchange Online ExchangeOnlineManagement Set-*

Set Exchange attributes in Active Directory for a specified server.

Quick start script

# Set-ExchangeServer — 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-ExchangeServer
$before | Format-List

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

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

Syntax

Set-ExchangeServer [-Identity] <ServerIdParameter>
 [-Confirm]
 [-CustomerFeedbackEnabled <Boolean>]
 [-DataCollectionEnabled <Boolean>]
 [-DomainController <Fqdn>]
 [-ErrorReportingEnabled <Boolean>]
 [-InternetWebProxy <Uri>]
 [-InternetWebProxyBypassList <MultiValuedProperty>]
 [-MitigationsApplied <MultiValuedProperty>]
 [-MitigationsBlocked <MultiValuedProperty>]
 [-MitigationsEnabled <Boolean>]
 [-MonitoringGroup <String>]
 [-ProductKey <ProductKey>]
 [-RingLevel <String>]
 [-StaticConfigDomainController <String>]
 [-StaticDomainControllers <MultiValuedProperty>]
 [-StaticExcludedDomainControllers <MultiValuedProperty>]
 [-StaticGlobalCatalogs <MultiValuedProperty>]
 [-WhatIf]
 [<CommonParameters>]

Parameters (19)

ParameterTypeRequiredWhat it controls
-Identity ServerIdParameter yes The Identity parameter specifies the Exchange server that you want to modify. You can use any value that uniquely identifies the server. For example:
-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.
-CustomerFeedbackEnabled Boolean The CustomerFeedbackEnabled parameter specifies whether the Exchange server is enrolled in the Microsoft Customer Experience Improvement Program (CEIP). The CEIP collects anonymous information about how you use...
-DataCollectionEnabled Boolean The DataCollectionEnabled parameter specifies whether the EM Service collects and send diagnostic data to Microsoft using OCS. Valid values are:
-DomainController Fqdn The DomainController parameter specifies the domain controller that's used by this cmdlet to read data from or write data to Active Directory. You identify the domain controller by its fully qualified domain name...
-ErrorReportingEnabled Boolean The ErrorReportingEnabled parameter specifies whether error reporting is enabled.
-InternetWebProxy Uri The InternetWebProxy parameter specifies the web proxy server that the Exchange server uses to reach the internet. A valid value for this parameter is the URL of the web proxy server.
-InternetWebProxyBypassList MultiValuedProperty The InternetWebProxyBypassList parameter specifies a list of servers that bypass the web proxy server specified by the InternetWebProxy parameter. You identify the servers by their FQDN (for example, server01.contoso.com).
-MitigationsApplied MultiValuedProperty Do not use this parameter. The EM service uses this parameter to store and track mitigation status.
-MitigationsBlocked MultiValuedProperty The MitigationsBlocked parameter specifies a list of mitigations that are blocked. The Mitigation IDs present in this list are not applied by EM service in its hourly run.
-MitigationsEnabled Boolean The MitigationsEnabled parameter specifies whether the Exchange Emergency Mitigation service (EM service) automatically applies mitigations on the Exchange server. Valid values are:
-MonitoringGroup String The MonitoringGroup parameter specifies how to add your Exchange servers to monitoring groups. You can add your servers to an existing group or create a monitoring group based on location or deployment, or to...
-ProductKey ProductKey The ProductKey parameter specifies the server product key.
-RingLevel String The RingLevel parameter specifies the server ring level that's used by the Feature Flighting feature.
-StaticConfigDomainController String The StaticConfigDomainController parameter specifies whether to configure a domain controller to be used by the server via Directory Service Access (DSAccess).
-StaticDomainControllers MultiValuedProperty The StaticDomainControllers parameter specifies whether to configure a list of domain controllers to be used by the server via DSAccess.
-StaticExcludedDomainControllers MultiValuedProperty The StaticExcludedDomainControllers parameter specifies whether to exclude a list of domain controllers from being used by the server.
-StaticGlobalCatalogs MultiValuedProperty The StaticGlobalCatalogs parameter specifies whether to configure a list of global catalogs to be used by the server via DSAccess.
-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.

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