Commands › Exchange Online
Set-PendingFederatedDomain
The Set-PendingFederatedDomain cmdlet is used by the Exchange admin center to configure pending domains with the federated organization identifier in the federation trust for the Exchange organization. You shouldn't use this cmdlet to attempt to manually configure a federation trust. The domains being added to the federation trust must exist as accepted domains in the Exchange organization.
Quick start script
# Set-PendingFederatedDomain — 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-PendingFederatedDomain
$before | Format-List
# 3. Make the change (dry run first)
Set-PendingFederatedDomain -WhatIf
Set-PendingFederatedDomain
# 4. Verify and diff
$after = Get-PendingFederatedDomain
Compare-Object ($before | Out-String) ($after | Out-String)
Syntax
Set-PendingFederatedDomain [[-Identity] <OrganizationIdParameter>]
[-Confirm]
[-DomainController <Fqdn>]
[-PendingAccountNamespace <SmtpDomain>]
[-PendingDomains <SmtpDomain[]>]
[-WhatIf]
[<CommonParameters>]
Parameters (6)
Reference facts derived from Microsoft documentation, © Microsoft, licensed CC BY 4.0; restructured with original guidance by serv365.ai.