Commands › Exchange Online
Set-AcceptedDomain
Modify existing accepted domains in your organization. An accepted domain is any SMTP namespace for which an Exchange organization sends and receives email.
Quick start script
# Set-AcceptedDomain — 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-AcceptedDomain
$before | Format-List
# 3. Make the change (dry run first)
Set-AcceptedDomain -Identity <AcceptedDomainIdParameter> -WhatIf
Set-AcceptedDomain -Identity <AcceptedDomainIdParameter>
# 4. Verify and diff
$after = Get-AcceptedDomain
Compare-Object ($before | Out-String) ($after | Out-String)
Syntax
Set-AcceptedDomain [-Identity] <AcceptedDomainIdParameter>
[-AddressBookEnabled <Boolean>]
[-CanHaveCloudCache <Boolean>]
[-Confirm]
[-DomainController <Fqdn>]
[-DomainType <AcceptedDomainType>]
[-EnableNego2Authentication <Boolean>]
[-MakeDefault <Boolean>]
[-MailFlowRegion <String>]
[-MatchSubDomains <Boolean>]
[-Name <String>]
[-OutboundOnly <Boolean>]
[-PendingCompletion <Boolean>]
[-PendingRemoval <Boolean>]
[-SendingFromDomainDisabled <Boolean>]
[-SendingToDomainDisabled <Boolean>]
[-WhatIf]
[<CommonParameters>]
Parameters (17)
Reference facts derived from Microsoft documentation, © Microsoft, licensed CC BY 4.0; restructured with original guidance by serv365.ai.