Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Exchange PowerShell Command to find blank values

Posted on 2010-09-02
4
Medium Priority
?
948 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 2000 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

The main intent of this article is to make you aware of ‘Exchange fail to mount’ error, its effects, causes, and solution.
How to effectively resolve the number one email related issue received by helpdesks.
In this video we show how to create a mailbox database 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 >> Data…
This video discusses moving either the default database or any database to a new volume.

877 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