I have setup an accepted domain, everything in the background is done, I am in the process of setting up the mail policy using the following command:

New-EmailAddressPolicy -Name “x.com” -IncludedRecipients “MailboxUsers” -ConditionalCompany “xx” -Priority “Lowest” -EnabledEmailAddressTemplates “SMTP:%g.%s@x.com ”

I get the following error

New-EmailAddressPolicy : Cannot convert SMTP:%g.%s@x.com to the type Microsoft.Exchange.Data.ProxyAddressTemplateCollection required by parameter 'EnabledEmailAddressTemplates'. Cannot perform this operation with the address 'SMTP:%g.%s@xz.com because it is invalid: The SMTP e-mail address template "%g.%s@xz.com " is invalid.At line:1 char:174+ New-EmailAddressPolicy-Name "xz.com" -IncludedRecipients "MailboxUsers" -ConditionalCompany "xz" -Priority "Lowest" -EnabledEmailAddressTemplates <<<<  "SMTP:%g.%s@xz.com "+ CategoryInfo: InvalidArgument: (:) [New-EmailAddressPolicy], ParameterBindingException+ FullyQualifiedErrorId : CannotConvertArgument,Microsoft.Exchange.Managem  ent.SystemConfigurationTasks.NewEmailAddressPolicy

I have setup the new accepted domain as an authoritative domain type.


There is a space at the end of your string: “SMTP:%g.%s@x.com ". When you change that to "SMTP:%g.%s@x.com" it should work.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.