Forum Discussion
ninja75
May 18, 2023Brass Contributor
Membership on Dynamic Distribution Group
I have some address mail like this "name.ext@mydomain". I would like to create a DDG with all these users. But if I try to use this command:
Set-DynamicDistributionGroup -Identity "myDDG" -RecipientFilter "(windowsliveid -like '*.ext@mydomain')"
it fails because the * it's not valid as first character.
How can I filter all the ext users and add them to my DDG?
- You cannot use leading wildcards. try the -match operator instead. If the idea is to include only Guest users, you can filter them based on the object type (RecipientTypeDetails -eq 'GuestMailUser')
- ninja75Brass Contributor
if I use -match this is the error:
Cannot process argument transformation on parameter 'RecipientFilter'. Cannot convert value "(windowsliveid -match '.email address removed for privacy reasons')" to type "System.String". Error: ""-match" is not a valid operator. For a list of supported operators see the command help.
I use "ext" only as example, they are not guests users.