Solved

Office 365 email forwarding powershell

Posted on 2014-11-07
5
235 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

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Today, security is a big concern in an organization to prevent sensitive data leakage. In Outlook you can secure your Outlook items (emails, calendars, contacts and other stuff) using various techniques like by marking item as private, or you can pu…
It’s a strangely common occurrence that when you send someone their login details for a system, they can’t get in. This article will help you understand why it happens, and what you can do about it.
This Micro Tutorial will demonstrate the easy use of Gmail embedding images in your email so the recipient of your email can view them in context.
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…

743 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

14 Experts available now in Live!

Get 1:1 Help Now