整理一个表,里面只包含address列,address 列是要添加到组的成员地址。
格式如下:
address
......
通过 Exchange Management Console 获取一个成员的添加、删除 Powershell 语句
如下图:
添加
删除
批量添加成员
Import-Csv .\addmember.txt | foreach {Add-DistributionGroupMember -Identity xxxxxx -Member $_.address -BypassSecurityGroupManagerCheck}
批量移除成员
Import-Csv .\removemember.txt | foreach {Remove-DistributionGroupMember xxxxxx -Member $_.address -BypassSecurityGroupManagerCheck -Confirm:$false}
根据表格批量添加成员到指定的通讯组
Import-Csv .\grouptoutf8.csv | foreach {Add-DistributionGroupMember -Identity $_.name -Member $_.member -BypassSecurityGroupManagerCheck}
csv 图示:
转载于:https://blog.51cto.com/zhaodongwei/1966220