Commands › Exchange Online
Set-ClientAccessServer
Modify settings that are associated with the Client Access server role. **Note**: In Exchange 2013 or later, use the Set-ClientAccessService cmdlet instead. If you have scripts that use Set-ClientAccessServer, update them to use Set-ClientAccessService.
Quick start script
# Set-ClientAccessServer — 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-ClientAccessServer
$before | Format-List
# 3. Make the change (dry run first)
Set-ClientAccessServer -Identity <ClientAccessServerIdParameter> -WhatIf
Set-ClientAccessServer -Identity <ClientAccessServerIdParameter>
# 4. Verify and diff
$after = Get-ClientAccessServer
Compare-Object ($before | Out-String) ($after | Out-String)
Syntax — 2 parameter sets
AlternateServiceAccount
Set-ClientAccessServer [-Identity] <ClientAccessServerIdParameter>
[-AlternateServiceAccountCredential <PSCredential[]>]
[-CleanUpInvalidAlternateServiceAccountCredentials]
[-Confirm]
[-DomainController <Fqdn>]
[-IrmLogEnabled <Boolean>]
[-IrmLogMaxAge <EnhancedTimeSpan>]
[-IrmLogMaxDirectorySize <Unlimited>]
[-IrmLogMaxFileSize <ByteQuantifiedSize>]
[-IrmLogPath <LocalLongFullPath>]
[-IsOutOfService <Boolean>]
[-RemoveAlternateServiceAccountCredentials]
[-WhatIf]
[<CommonParameters>]
Identity
Set-ClientAccessServer [-Identity] <ClientAccessServerIdParameter>
[-Array <ClientAccessArrayIdParameter>]
[-AutoDiscoverServiceInternalUri <Uri>]
[-AutoDiscoverSiteScope <MultiValuedProperty>]
[-Confirm]
[-DomainController <Fqdn>]
[-IrmLogEnabled <Boolean>]
[-IrmLogMaxAge <EnhancedTimeSpan>]
[-IrmLogMaxDirectorySize <Unlimited>]
[-IrmLogMaxFileSize <ByteQuantifiedSize>]
[-IrmLogPath <LocalLongFullPath>]
[-IsOutOfService <Boolean>]
[-WhatIf]
[<CommonParameters>]
Parameters (16)
Reference facts derived from Microsoft documentation, © Microsoft, licensed CC BY 4.0; restructured with original guidance by serv365.ai.