Solved

Exchange PowerShell Command to find blank values

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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering 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

Find out what you should include to make the best professional email signature for your organization.
A quick Powershell script I wrote to find old program installations and check versions of a specific file across the network.
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…
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…

756 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