Solved

Office 365 email forwarding powershell

Posted on 2014-11-07
5
256 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Pop culture is prime bait for hackers seeking to infect user’s computers and mobile devices with malicious malware. Hackers know exactly what the latest trends are online and know how to use them to their advantage.
Article by: Dermot
The life of crime is over for 22 year-old Christian Ian Salvador, a student from Isabela State University in the Philippines.
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, just open a new email message. In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

749 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