Search code examples
powershellexchange-server-2010

Exchange 2010 Powershell - Can't view Recipient Filter


I have a dynamic distribution list that I'm trying to modify, however the current filter is complex and was not set up by me. I'm trying to decode it so I can exclude certain emails from it, since currently it seems to include all mailboxes and contacts in the domain.

This is the current filter as displayed in the Exchange Management Console, honestly I don't know enough about the filters to decode this string:

(&(!cn=SystemMailbox{*})(& (mailnickname=*) (| (&(objectCategory=person)(objectClass=user)(|(homeMDB=*)(msExchHomeServerName=*)))(&(objectCategory=person)(objectClass=contact)) )))

The powershell command below isn't showing me the filter in the Exchange Management Shell, which I would probably be able to decode easier that this query above:

(Get-DynamicDistributionGroup GROUP_NAME).RecipientFilter

I've made sure I'm part of the Organization and Recipient Admin groups, is there something else I'm missing to be able to display this in the Shell? What's the easiest way to decode this filter?


Solution

  • If you need to convert ldap filter to opath you cabn use this script:

    http://gallery.technet.microsoft.com/scriptcenter/7c04b866-f83d-4b34-98ec-f944811dd48d