Solved

i need a powershell command that looks for ForwardingSMTPAddress in OU

Posted on 2014-11-06
2
404 Views
Last Modified: 2014-11-12
need a powershell script that looks in an ou to see if ForwardingSMTPAddress is enable
0
Comment
Question by:Jorge Ocampo
[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
2 Comments
 
LVL 19

Assisted Solution

by:Adam Farage
Adam Farage earned 250 total points
ID: 40427627
I think the easiest way to do this is to turn this into a report..


Get-Mailbox -OrganizationalUnit <enter OU location without brackets> | Select DisplayName, ForwardingSmtpAddress | Export-CSV C:\Forwarding.csv

Open in new window


Open the document in Excel:

C:\Forwarding.csv (or you can simply open excel, but I like typing stuff out)

Open in new window


Click on the Insert tab, and then select "My table has headers". From there filter out the section that says "blank" and pow - there are the users who have a forwarding along with the destination in a nice simple report :)
0
 
LVL 16

Accepted Solution

by:
Joshua Grantom earned 250 total points
ID: 40428384
Or you can just pull a report that only includes users who have a value for ForwardingSMTPAddress.

Get-Mailbox -OrganizationalUnit "OU=MyOU,DC=domain,DC=com" -Filter {ForwardingSmtpAddress -ne $null} | Select Name,ForwardingSmtpAddress | Export-CSV C:\ForwardingEnabled.csv -nti

Open in new window


If the first one doesn't work

Get-Mailbox -OrganizationalUnit "OU=MyOU,DC=domain,DC=com" -Filter {ForwardingSmtpAddress -ne "*"} | Select Name,ForwardingSmtpAddress | Export-CSV C:\ForwardingEnabled.csv -nti

Open in new window

0

Featured Post

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

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

This article explains how to install and use the NTBackup utility that comes with Windows Server.
How to resolve IMCEAEX NDRs in Exchange or Exchange Online related to invalid X500 addresses.
In this video we show how to create an Address List in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Organization >> Ad…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

726 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