?
Solved

i need a powershell command that looks for ForwardingSMTPAddress in OU

Posted on 2014-11-06
2
Medium Priority
?
447 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 1000 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 1000 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

After hours on line I found a solution which pointed to the inherited Active Directory permissions . You have to give/allow permissions to the "Exchange trusted subsystem" for the user in the Active Directory...
A couple of months ago we ran into an issue that necessitated re-creating our Edge Subscriptions. However, when we attempted to execute the command: New-EdgeSubscription -filename C:\NewEdgeSub_01.xml we received an error indicating that the LDAP se…
In this video we show how to create a Shared Mailbox 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 Recipients >> Sha…
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…
Suggested Courses

762 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