Commands › Exchange Online
New-AddressRewriteEntry
This cmdlet is available or effective only on Edge Transport servers in on-premises Exchange. Use the New-AddressRewriteEntry cmdlet to create an 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
# New-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)
New-AddressRewriteEntry -Name <String> -ExternalAddress <String> -InternalAddress <String> -WhatIf
New-AddressRewriteEntry -Name <String> -ExternalAddress <String> -InternalAddress <String>
# 4. Verify and diff
$after = Get-AddressRewriteEntry
Compare-Object ($before | Out-String) ($after | Out-String)
Syntax
New-AddressRewriteEntry [-Name] <String> -ExternalAddress <String> -InternalAddress <String>
[-Confirm]
[-DomainController <Fqdn>]
[-ExceptionList <MultiValuedProperty>]
[-OutboundOnly <Boolean>]
[-WhatIf]
[<CommonParameters>]
Parameters (8)
Reference facts derived from Microsoft documentation, © Microsoft, licensed CC BY 4.0; restructured with original guidance by serv365.ai.