Dynamic Distribution Groups

Copper Contributor

Hi

It is desirable that all dynamic distribution groups get the filter "AccountEnabled -eq $true" and scanners and meeting rooms are filtered out from these lists.

Can you please tell me how can I do it?

 

Regards

1 Reply
There is no AccountEnabled property. There is an AccountDisabled one, but you cannot use it for DDG filters. Instead, you can filter by ExchangeUserAccountControl. Something like this:

Get-Recipient -RecipientPreviewFilter {-not(ExchangeUserAccountControl -eq 2 -and RecipientTypeDetails -eq "RoomMailbox")}