且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何批量添加和删除SMTP地址

更新时间:2022-09-07 15:03:00

为用户添加一个SMTP地址,
Set-Mailbox "Dan Jump" -EmailAddresses @{add="dan.jump@northamerica.contoso.com"}

为用户添加多个SMTP地址:
Set-Mailbox "Dan Jump" -EmailAddresses @{add="dan.jump@northamerica.contoso.com","danj@tailspintoys.com"}

查看用户的SMTP地址:

Get-Mailbox <identity> | fl EmailAddresses


删除SMTP地址:

为用户删除一个SMTP地址,
Set-Mailbox "Janet Schorr" -EmailAddresses @{remove="janets@corp.contoso.com"}
为用户删除多个SMTP地址:
Set-Mailbox "Janet Schorr" -EmailAddresses @{remove="janet.schorr@corp.contoso.com","janets@tailspintoys.com"}


如何设置Primary SMTP地址和Secondary STMP地址:

Set-Mailbox "fujingjie" -EmailAddresses SMTP:fujingjie@contoso.com,smtp:fujingjie@test.contoso.com


本文转自  zyliday   51CTO博客,原文链接:http://blog.51cto.com/zyliday/1725681