Forum Discussion

oskarkuus's avatar
oskarkuus
Brass Contributor
Jul 07, 2024

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?

 

 

Resources