Solved

Exchange PowerShell Command to find blank values

Posted on 2010-09-02
4
907 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

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Disabling the Directory Sync Service Account in Office 365 will stop directory synchronization from working.
This article explains in simple steps how to renew expiring Exchange Server Internal Transport Certificate.
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…
This video discusses moving either the default database or any database to a new volume.

707 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