We need to edit an existing Dynamic Distribution Group in Exchange Online
I need it to only list User with China listed for the Country, and I am trying to add additional filter to filter out Mailboxes with Custom Attribute 1 excludechina so those mailboxes will not show up in the list recipients.
here is script :
Set-DynamicDistributionGroup -Identity allChinaUsers -RecipientFilter {RecipientType CustomAttribute1 -ne 'excludechina' -and CountryOrRegion -eq "China" -and RecipientType -eq 'UserMailbox'}