Hide from Exchange AddresLists check box - OPATH filter logic reversed?
I recently had to convert a Dynamic groups from LDAP filters on Exchange 2003 to OPATH on Exchange 2007.The filtermustselect all active staff members.If a mailbox is not for staff member the Company field has the value 'Contractor'If the mailbox is not a person the Department has the value 'Resource' (from before resource mailboxes existed)If a person has left but their e-mail is still being read by someone else the Hide From Exchange Address Lists is checked on the general properties tab.This filter correctly returns all Active staff:-RecipientFilter {(Alias -ne $null -and (ObjectClass -eq 'user') -and (Company -ne 'Contractor') -and (Department -ne 'Resource') -and (HiddenFromAddressListsEnabled -ne $false) )} The problem is, I expected the logic to select non-hidden mailboxes to be: HiddenFromAddressListsEnabled -eq $falsebut this logic returned all the hidden mailboxes.Doesn'ta check box become TRUE when checked?Can anyone explain this logic please?Cheers,Mark.
September 26th, 2009 11:47am

Yes, that's true. If checkbox is selected means value is True but by default if you see in AD with ADSIEdit.msc then you can find the attribute type is Boolean and value is Not Set if checkbox is not selected so when you filter the recipient with -ne $False it picks up the recipients which are set to Not Set so in your casepreferredfilter would beHiddenfromAddresslistsEnabled -eq $true.... Amit Tank | MVP Exchange Server | MCITP: EMA | MCSA: M | http://ExchangeShare.WordPress.com
Free Windows Admin Tool Kit Click here and download it now
September 26th, 2009 2:42pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics