Forum Discussion

chapter7's avatar
chapter7
Copper Contributor
Jul 05, 2024

Dynamic Distribution Groups

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

  • 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")}

Resources