Back to blog

List Office 365 Mailboxes with a Forward

18 Jun 2013 by Dan Rose

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 learn more about our Office 365 reporting software which will give you the added benefit of having this report automatically sent out on a regular basis.

Read more: Optimizing PowerShell for large Office 365 tenants

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.
Screen Shot 2013-06-18 at 14.23.15
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