簡體   English   中英

PowerShell:在現有別名的基礎上向 AD 組(proxyAddresses)添加新別名

[英]PowerShell: add new Aliases to AD Groups (proxyAddresses) based on the existing ones

你好,希望每個人都做得很好。

我被要求為數以千計的 DG 在 AD 中的分發組中添加新的代理地址,並將新代理地址設為主要 SMTP,如下所示;

**Dist. Group example:**
DG Name: TestDistGroup
SMTP:testdistgroup@domain1.com
smtp:tdg@domain1.com
smtp:testdg@domain1.com

我必須將與上面相同的別名添加到 proxyAddresses 列表中,但具有不同的域 (domain2.com),保留現有別名並將當前主要 (SMTP:testdistgroup@domain1.com) 切換為 (SMTP:testdistgroup@domain2) .com)。

知道使用 PowerShell 實現此目標的最佳方法是什么嗎?

我希望我能很好地解釋自己。 預先感謝您提供的任何幫助

我自己也能完成這個,腳本可以在以下位置找到; https://gist.github.com/heyvoon/a6645bf8d9e1a5f5681aee05c24dbf9c

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM