Solved

Exchange Query for Forwarding users

Posted on 2011-02-16
3
1,266 Views
Last Modified: 2012-05-11
Hi,

I have a query that exports users that are NOT having their emails forwards. I need one that shows me which ARE having their emails forwarded, I thought I just needed to add $true in the query instead of $null, but it's not working.


Get-Mailbox -Filter { ForwardingAddress -eq $Null } | Select-Object PrimarySmtpAddress,
    SamAccountName, DisplayName,
    @{n='Department';e={ (Get-User $_.DistinguishedName).Department }} |
  Export-Csv C:\noforward.csv -NoTypeInformation
Get-Mailbox -Filter { ForwardingAddress -eq $Null } | Select-Object PrimarySmtpAddress, 
    SamAccountName, DisplayName,
    @{n='Department';e={ (Get-User $_.DistinguishedName).Department }} | 
  Export-Csv C:\noforward.csv -NoTypeInformation

Open in new window

0
Comment
Question by:Methodman85
3 Comments
 
LVL 3

Accepted Solution

by:
Richard2k4 earned 250 total points
Comment Utility
have you tried get-mailbox -filter { ForwardingAddress -gt $Null}

0
 
LVL 41

Assisted Solution

by:Amit
Amit earned 250 total points
Comment Utility
Try This

Get-Mailbox | Where {$_.ForwardingAddress -ne $null} | Select Name, ForwardingAddress, DeliverToMailboxAndForward
0
 
LVL 1

Author Closing Comment

by:Methodman85
Comment Utility
Thank you good sirs, both worked!
0

Featured Post

Zoho SalesIQ

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

Join & Write a Comment

ADCs have gained traction within the last decade, largely due to increased demand for legacy load balancing appliances to handle more advanced application delivery requirements and improve application performance.
A procedure for exporting installed hotfix details of remote computers using powershell
In this video we show how to create an Accepted Domain 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 Mail Flow >> Ac…
This tutorial will walk an individual through the process of configuring their Windows Server 2012 domain controller to synchronize its time with a trusted, external resource. Use Google, Bing, or other preferred search engine to locate trusted NTP …

771 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

11 Experts available now in Live!

Get 1:1 Help Now