• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 963
  • Last Modified:

Exchange PowerShell Command to find blank values

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
SRSVegas
Asked:
SRSVegas
  • 2
1 Solution
 
duraswitchCommented:
try:
get-mailbox | where {$_.ManagedFolderMailboxPolicy -eq $Null}
0
 
endital1097Commented:
sometimes the -eq $null doesn't work
in those instance you can try the following
Get-Mailbox | where {!$_.ManagedFolderMailboxPolicy}
0
 
endital1097Commented:
have you had a chance to try out these solutions?
0
 
SRSVegasAuthor Commented:
get-mailbox | where {$_.ManagedFolderMailboxPolicy -eq $Null} worked.  Without -eq $Null I get every mailbox back.

Thanks,
ML
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Simplify Active Directory Administration

Administration of Active Directory does not have to be hard.  Too often what should be a simple task is made more difficult than it needs to be.The solution?  Hyena from SystemTools Software.  With ease-of-use as well as powerful importing and bulk updating capabilities.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now