Commands › Exchange Online
Set-ServerComponentState
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)
Reference facts derived from Microsoft documentation, © Microsoft, licensed CC BY 4.0; restructured with original guidance by serv365.ai.