Solved

Office 365 email forwarding powershell

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

Zoho SalesIQ

Hassle-free live chat software re-imagined for business growth. 2 users, always free.

Question has a verified solution.

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

Explore the encryption capabilities built into Google Apps and how these features can help you meet privacy policy and regulatory compliance, but are not a full solution. Understand and compare the most popular email encryption services for Google A…
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 tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

920 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

12 Experts available now in Live!

Get 1:1 Help Now