[英]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.