Commands › Exchange Online

Set-ServerComponentState

Exchange Online ExchangeOnlineManagement Set-*

Configure and update Microsoft Exchange components and endpoints on servers you specify.

Quick start script

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

# 3. Make the change (dry run first)
Set-ServerComponentState -Identity <ServerIdParameter> -Component <String> -Requester <String> -WhatIf
Set-ServerComponentState -Identity <ServerIdParameter> -Component <String> -Requester <String>

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

Syntax

Set-ServerComponentState [-Identity] <ServerIdParameter> -Component <String> -Requester <String> -State <ServiceState>
 [-Confirm]
 [-DomainController <Fqdn>]
 [-LocalOnly]
 [-RemoteOnly]
 [-TimeoutInSeconds <Int32>]
 [-WhatIf]
 [<CommonParameters>]

Parameters (10)

ParameterTypeRequiredWhat it controls
-Identity ServerIdParameter yes The Identity parameter specifies the Exchange server where you want to run this command. You can use any value that uniquely identifies the server. For example:
-Component String yes The Component parameter specifies the component or endpoint for which you want to set the state.
-Requester String yes The Requester parameter specifies the system requesting this state change. Valid values are:
-State ServiceState yes The State parameter specifies the state that you want for the component. Valid values are:
-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.
-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...
-LocalOnly SwitchParameter The LocalOnly switch specifies that the changes are written to the registry of the Exchange server only and not to Active Directory. You don't need to specify a value with this switch.
-RemoteOnly SwitchParameter The RemoteOnly switch specifies that the changes are written to Active Directory only and not to the registry of the Exchange server. You don't need to specify a value with this switch.
-TimeoutInSeconds Int32 This parameter is reserved for internal Microsoft use.
-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.