I was able to remove one user using this command:
Set-DynamicDistributionGroup -Identity "All Staff" -RecipientFilter {((RecipientType -eq 'UserMailbox') -and -not(Name -like 'Employment'))}
But I have more than one mailbox that I want to remove. Is it possible to add another mailbox into the above command?
Best Answer
Unless there is some common property you can use to filter against all the recipients you have to exclude, you will need to exclude them one by one using multiple exclusion filters.