Solved

Office 365 email forwarding powershell

Posted on 2014-11-07
5
243 Views
Last Modified: 2014-11-07
Does anyone know of any powershell scripts/commands that can list out any and all mailboxes within Office365  that have their email forwarded to another address and/or user?
0
Comment
Question by:mtkaiser
  • 3
  • 2
5 Comments
 
LVL 16

Accepted Solution

by:
Joshua Grantom earned 500 total points
ID: 40428750
This should get what you want. I would also modify your question to include Powershell as a Topic not just a tag.

Get-Mailbox | select UserPrincipalName,ForwardingSmtpAddress,DeliverToMailboxAndForward

Open in new window


If you want to export to CSV

Get-Mailbox | select UserPrincipalName,ForwardingSmtpAddress,DeliverToMailboxAndForward | Export-CSV C:\UsersForwarding.csv -nti

Open in new window

0
 

Author Comment

by:mtkaiser
ID: 40428883
That worked great.  Another question....how would I modify that command to show any users that are configured to be hidden from the address lists?
0
 
LVL 16

Expert Comment

by:Joshua Grantom
ID: 40428903
Running this would show any users that are hidden

Get-Mailbox | Where {$_.HiddenFromAddressListsEnabled -eq $True}

Open in new window


on my previous post I also forgot to include the filter to narrow down the list to only those with forwards

Get-Mailbox -Filter {ForwardingSmtpAddress -ne $null} | select UserPrincipalName,ForwardingSmtpAddress,DeliverToMailboxAndForward

Open in new window

0
 

Author Closing Comment

by:mtkaiser
ID: 40429042
Thanks for all of your help!!
0
 
LVL 16

Expert Comment

by:Joshua Grantom
ID: 40429044
you're welcome!
0

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

In this post, we will have a look on how to install Exchange Server 2013 from command prompt, instead of using the graphical user interface. Below are the steps that are to be performed to install Exchange Server 2013. 1. Domain Controller and…
The biggest nightmare for any Exchange Server Administrator is to keep the server running without any issue. But the problems often come and they need to be resolved efficiently and timely. Here are important troubleshooting points: Define the Pr…
The purpose of this video is to demonstrate how to set up an account with Mailchimp. This will be demonstrated using a Windows 8 PC. Tools Used are: Mailchimp.com Go to Mailchimp.com : Enter an Email, Username, and Password. Click Create My Acco…
This Micro Tutorial demonstrates  how Internet marketers work with competitive analysis data, and a common task in data preparation is creating separate column for domains. You will then extract from a list of URLs.

815 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now