List Office 365 Mailboxes with a Forward
Want to save this blog for later? Download it now.
One very quick way of obtaining a list of users in your Office 365 Organisation that have a forward set on their mailbox, is by using the get-mailbox cmdlet within Powershell.
Alternatively, you can sign up for a free trial of our Office 365 reporting service which will give you the added benefit of having this report automatically sent out on a regular basis.
Firstly, fire up a Powershell session and connect to your Office 365 environment.
At the command prompt type the following:
Get-Mailbox | select UserPrincipalName,ForwardingSmtpAddress,DeliverToMailboxAndForward
The DeliverToMailboxAndForward tell you if the button is selected to keep a local copy before forwarding.
If you wanted to export this to a CSV then simply append the Export-CSV cmdlet as shown in the example below.
Get-Mailbox | select UserPrincipalName,ForwardingSmtpAddress,DeliverToMailboxAndForward | Export-csv .\users.csv -NoTypeInformation
If you found this blog post useful, and want to refer to it again, why not download it as a PDF?