电子邮件地址政策无效

电子邮件地址政策无效

我已经设置了一个接受域,后台的所有工作都已完成,我正在使用以下命令设置邮件策略:

New-EmailAddressPolicy -Name “x.com” -IncludedRecipients “MailboxUsers” -ConditionalCompany “xx” -Priority “Lowest” -EnabledEmailAddressTemplates “SMTP:%g.%[email protected]

我收到以下错误

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

我已将新的接受域设置为权威域类型。

答案1

字符串末尾有一个空格:。将其更改为 后,它应该可以工作。“SMTP:%g.%[email protected] ""SMTP:%g.%[email protected]"

相关内容