This article will explain how to forward emails from one user to anther user via PowerShell.
- Connect to Office 365 via PowerShell
- To check the current forwarding settings (if any) on the mailbox:
Get-Mailbox -Identity user@domain.com | FL ForwardingSMTPAddress
Note: It is not necessary that you’ll receive an email in the list, you may get a blank result. It means that there is no forwarding configured yet. However if you see that there is an existing email address listed, and you wish to remove it before adding another email address, you can run the following command:
Set-Mailbox -Identity user1@domain.com -ForwardingSmtpAddress $null
The command above will remove the existing forwarding address (if any) and you can then configure the new forwarding address.
- To Configure forwarding for a user to another user, considering the mailbox still exists:
Set-Mailbox -Identity user1@domain.com -ForwardingSmtpAddress user2@domain.com -DeliverToMailboxAndForward $true
With the use of this command you are forwarding all emails sent to user1@domain.com to user2@domain.com and also leaving the copy of the email in the mailbox of user1@domain.com. If you do not wish to leave a copy of the mail in user1’s mailbox, than set the value of –DeliverToMailboxAndForward to $false. You can also configure the forwarding to an external email address instead of internal, if required.
Please do not forget to share your feedback, or ask us a question by clicking here.
Latest posts by Rishi Chaudhary (see all)
- ShadowCopy Backup after renaming VSSADMIN.EXE - October 5, 2016
- No Network Connection after Windows 10 Upgrade – Fixed - August 25, 2015
- Windows 10 System Tray Notification Issue - August 7, 2015