Solved

Exchange PowerShell Command to find blank values

Posted on 2010-09-02
4
909 Views
Last Modified: 2012-05-10
How can I filter the results of an Exchange 2007 command shell command for values that have a blank value?  I know how to do it for a certain value.  For example:

get-mailbox | where {$_.ManagedFolderMailboxPolicy -eq "30 Day Deleted Item Retention Policy"}

How do I filter for mailboxes where $_.ManagedFolderMailboxPolicy is blank?
0
Comment
Question by:SRSVegas
  • 2
4 Comments
 
LVL 5

Accepted Solution

by:
duraswitch earned 500 total points
ID: 33592723
try:
get-mailbox | where {$_.ManagedFolderMailboxPolicy -eq $Null}
0
 
LVL 32

Expert Comment

by:endital1097
ID: 33593240
sometimes the -eq $null doesn't work
in those instance you can try the following
Get-Mailbox | where {!$_.ManagedFolderMailboxPolicy}
0
 
LVL 32

Expert Comment

by:endital1097
ID: 33596395
have you had a chance to try out these solutions?
0
 

Author Closing Comment

by:SRSVegas
ID: 33600030
get-mailbox | where {$_.ManagedFolderMailboxPolicy -eq $Null} worked.  Without -eq $Null I get every mailbox back.

Thanks,
ML
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Marketers need statistics and metrics like everybody else needs oxygen. In this article we explain how to enable marketing campaign statistics for Microsoft Exchange mail.
Scam emails are a huge burden for many businesses. Spotting one is not always easy. Follow our tips to identify if an email you receive is a scam.
In this video we show how to create an email address policy 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…
To show how to generate a certificate request 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 Servers >> Certificates…

910 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

19 Experts available now in Live!

Get 1:1 Help Now