Forum Discussion
Dynamic Distribution Group User Exclusion Recipient Filter
How are you checking the membership? If using the Get-DynamicDistributionGroupMember cmdlet, remember it only updates once every 24h or so.
- MGlomskiFeb 23, 2024Copper Contributor
VasilMichev
I have been using the (get-dynamicdistributiongroupmember -identity $identity | Select-object DisplayName,PrimarySmtpAddress) to get recipients.
I've also been using:
$filter = $TheRecipientFilterSyntax
Get-Recipient -filter $filter | Select-object DisplayName,PrimarySmtpAddress
I'm testing with the following now:
"(((Office -eq 'Spokane, WA')) -or ((Office -eq 'Sandpoint, ID')) -and (RecipientType -eq 'UserMailbox') -and (RecipientTypeDetails -eq 'UserMailbox') -and (-not(Name -like '<service-account's-name>')) -and (-not(Name -like '<service-account's-name>*')))"
I've got a wild-card on the last one because there's a handful of service accounts with ascending numbers that match that ANR.
Thanks for the tip! Hopefully this gets the results I'm looking for.
Will check back in next week.- MGlomskiMar 06, 2024Copper ContributorUnfortunately the exclusion did not take successfully and the service accounts are still being shown as recipients.