Forum Discussion
chapter7
Jul 05, 2024Copper Contributor
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 ...
VasilMichev
Jul 05, 2024MVP
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")}
Get-Recipient -RecipientPreviewFilter {-not(ExchangeUserAccountControl -eq 2 -and RecipientTypeDetails -eq "RoomMailbox")}