Commands › Exchange Online
Set-AddressRewriteEntry
This cmdlet is available or effective only on Edge Transport servers in on-premises Exchange. Use the Set-AddressRewriteEntry cmdlet to modify an existing address rewrite entry that rewrites sender and recipient email addresses in messages sent to or sent from your organization through an Edge Transport server.
Quick start script
# Set-AddressRewriteEntry — 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-AddressRewriteEntry
$before | Format-List
# 3. Make the change (dry run first)
Set-AddressRewriteEntry -Identity <AddressRewriteEntryIdParameter> -WhatIf
Set-AddressRewriteEntry -Identity <AddressRewriteEntryIdParameter>
# 4. Verify and diff
$after = Get-AddressRewriteEntry
Compare-Object ($before | Out-String) ($after | Out-String)
Syntax
Set-AddressRewriteEntry [-Identity] <AddressRewriteEntryIdParameter>
[-Confirm]
[-DomainController <Fqdn>]
[-ExceptionList <MultiValuedProperty>]
[-ExternalAddress <String>]
[-InternalAddress <String>]
[-Name <String>]
[-OutboundOnly <Boolean>]
[-WhatIf]
[<CommonParameters>]
Parameters (9)
Reference facts derived from Microsoft documentation, © Microsoft, licensed CC BY 4.0; restructured with original guidance by serv365.ai.