附加到Exchange命令行管理程序中的proxyAddresses列表

Adding to a list of EmailAddresses in Exchange has the potential to be one of those 'gotcha' issues that, if performed incorrectly, can really make you momentarily rethink your career in IT.  This is because if proper measures are not taken, the list of mailbox alias' can be overwritten by your one addition.  For example, if the following command was run, all pre-existing proxyAddresses would be overwritten with the addition of userA1@domain.com:

在Exchange中添加到EmailAddresses列表中,可能会成为那些“陷阱”问题之一,如果执行不正确,则可能使您立即重新思考IT事业。 这是因为,如果未采取适当的措施,则邮箱别名列表可能会被您的一个添加项所覆盖。 例如,如果运行以下命令,则所有先前存在的proxyAddress都将被添加userA1@domain.com覆盖:

Set-Mailbox userA -EmailAddresses 'userA1@domain.com'

The process to work around this has traditionally involved adding the complete list of alias' each time instead of just the one like so:

解决此问题的过程传统上涉及每次都添加完整的别名列表,而不仅仅是这样的列表:

$user = Get-Mailbox userA
$user.EmailAddresses += 'userA1@domain.com'
$user | Set-Mailbox

A simple work around available in PowerShell 2.0 and beyond involves the use of an array:

在PowerShell 2.0和更高版本中可用的简单解决方法涉及使用数组:

Set-Mailbox userA -EmailAddresses @{add='userA1@domain.com'}

Now we can add just one address at a time instead of being forced to account for the entire list with each new request.  Enjoy!

现在,我们一次只能添加一个地址,而不必在每次新请求时都被要求说明整个列表。 请享用!

翻译自: https://www.experts-exchange.com/articles/24339/Appending-to-a-list-of-proxyAddresses-in-Exchange-Management-Shell.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值