我创建了一个脚本,可以自动在 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 | Set-mailbox -EmailAddressPolicyEnabled $true
并按域进行限制
Get-mailbox | Where {$_.EmailAddresses -like ‘*@domain.com’} |
Set-mailbox -EmailAddressPolicyEnabled $true
远程
Get-mailbox | Where {$_.EmailAddresses -like ‘*@domain.com’} |
Set-RemoteMailbox EmailAddressPolicyEnabled
关于Powershell交换模块远程邮箱问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30280768/