Forum Discussion
oskarkuus
Jul 07, 2024Brass Contributor
Set exchange policy with filter?
I am trying to figure out how to run a command to create a exchange online emailadresspolicy.
New-EmailAddressPolicy -Name Groups1 -IncludeUnifiedGroupRecipients -EnabledEmailAddressTemplates "SMTP:@santa.mycompany.com","smtp:@santa.mycompany.com" -RecipientFilter {mailNickname -like 'Santa_*'} -Priority 1
I want all groups that are that have a mailnickname that starts with "Santa_" to be created with a specific subdomain.
I can not create it tho, i get error that recipientFilter is not a valid attribute.
New-EmailAddressPolicy: A parameter cannot be found that matches parameter name 'RecipientFilter'.
i have also tried ConditionalCustomAttribute1 but get the same error:
anyone able to help?
- Use the New-EmailAddressPolicy cmdlet to create email address policies. In Exchange Online, email address policies are available only for Microsoft 365 Groups.
https://learn.microsoft.com/en-us/powershell/module/exchange/new-emailaddresspolicy?view=exchange-ps- oskarkuusBrass ContributorI dont understand. Do you mean that it is not possible to use filtering in exchange online?
So there is no way to trigger the policy based on a groups mailNickname value then?- Any update?