1. Open PowerShell as Administrator
2. Enter below command on PowerShell (Change the user name and domain name)
Import-Module ExchangeOnlineManagement
Connect-ExchangeOnline -UserPrincipalName UserName@OldDomainName.com
# Get mailbox forwarding details
Get-Mailbox UserName@DomainName.com | Format-List ForwardingSMTPAddress,DeliverToMailboxandForward
# Enable Email Forwarding
Set-Mailbox -Identity "UserName@OldDomainName.com" -DeliverToMailboxAndForward $false -ForwardingSMTPAddress "UserName@NewDomainName.com"
# Remove Forwarding rules from Mailbox
Set-Mailbox UserName@DomainName.com -ForwardingSmtpAddress $Null