Powershell Exchange模块远程邮箱问题

Powershell Exchange模块远程邮箱问题,powershell,azure,active-directory,exchange-server,office365,Powershell,Azure,Active Directory,Exchange Server,Office365,我创建了一个脚本,可以在Exchange中自动创建用户,然后从o365向其添加许可证。但是,我需要在底部的框中显示“根据应用于此收件人的电子邮件地址策略自动更新电子邮件地址”,以便在创建帐户时自动勾选 以下是创建远程邮箱的主要组件: New-RemoteMailBox -Alias $identAlias -Name $name -FirstName $return[0] -LastName $return[1] -UserPrincipalName $eAddress -Password

我创建了一个脚本,可以在Exchange中自动创建用户,然后从o365向其添加许可证。但是,我需要在底部的框中显示“根据应用于此收件人的电子邮件地址策略自动更新电子邮件地址”,以便在创建帐户时自动勾选

以下是创建远程邮箱的主要组件:

New-RemoteMailBox -Alias $identAlias -Name $name -FirstName $return[0] -LastName $return[1] -UserPrincipalName $eAddress  -Password (ConvertTo-SecureString -String 'xxxxxxx' -AsPlainText -Force) -ResetPasswordOnNextLogon $true 
请帮忙

适用于

并通过域进行限制

Get-mailbox | Where {$_.EmailAddresses -like ‘*@domain.com’} |
 Set-mailbox -EmailAddressPolicyEnabled $true
遥远地

Get-mailbox | Where {$_.EmailAddresses -like ‘*@domain.com’} |
Set-RemoteMailbox EmailAddressPolicyEnabled

您是否尝试过手动更改属性,然后再次获取邮箱并比较属性否。我无法确定哪个参数控件可以用于set-remotemailbox而不是set-mailbox?初始检查。现有邮箱将需要我很抱歉我有点困惑你所说的启用是什么意思。你能给我举个例子吗?链接中有一个例子:启用RemoteMailbox“Kim Akers”
Get-mailbox | Where {$_.EmailAddresses -like ‘*@domain.com’} |
Set-RemoteMailbox EmailAddressPolicyEnabled