积极答复者
批量导出通讯组及组成员

问题
-
exchange server 2013 sp1 下如何批量导出邮箱地址后缀是固定某个域名的所有通讯组列表以及每个组的成员显示名和邮箱地址。
比如邮件系统里有很多通讯组或安全组,而且这些组的邮箱地址后缀域名有三种,比如 xxxx@abc.com , xxxx@678.com, xxxx@uiy.com . 如何只导出邮箱后缀是@abc.com的通讯组列表及组成员。
- 已编辑 techboyonline 2017年6月2日 9:53
答案
-
您好,
感谢您联系我们论坛。
根据测试请参考下面脚本:
$Groups=Get-DistributionGroup | Where {$_.emailaddresses –like "*test.com*"}
$Groups| foreach{
$GroupName=$_.Name
$Report+=Get-distributionGroupMember -identity $_.identity | select @{Name='Distribution Group'; Expression={[String]::join(";", $GroupName)}}, Name, PrimarySmtpAddress}
$Report| export-csv "c:\MyFile.csv" -notype
提示:运行前请根据需要改变黄色部分。
测试结果:
希望可以帮到您。
Regards,
Jason Chao
Please remember to mark the replies as answers if they help.
If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.- 已标记为答案 techboyonline 2017年6月6日 9:47
-
如果是同样的需求的话,一样可以运行上面的脚本。如果有其他需求建议上一个新帖到Exchange论坛,相信会有工程师给您提供帮助,这个帖子已经归档了。
希望可以帮到您,感谢您的理解,谢谢。
Regards,
Jason Chao
Please remember to mark the replies as answers if they help.
If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.- 已标记为答案 techboyonline 2018年9月4日 1:40
全部回复
-
您好,
感谢您联系我们论坛。
根据测试请参考下面脚本:
$Groups=Get-DistributionGroup | Where {$_.emailaddresses –like "*test.com*"}
$Groups| foreach{
$GroupName=$_.Name
$Report+=Get-distributionGroupMember -identity $_.identity | select @{Name='Distribution Group'; Expression={[String]::join(";", $GroupName)}}, Name, PrimarySmtpAddress}
$Report| export-csv "c:\MyFile.csv" -notype
提示:运行前请根据需要改变黄色部分。
测试结果:
希望可以帮到您。
Regards,
Jason Chao
Please remember to mark the replies as answers if they help.
If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.- 已标记为答案 techboyonline 2017年6月6日 9:47
-
如果是同样的需求的话,一样可以运行上面的脚本。如果有其他需求建议上一个新帖到Exchange论坛,相信会有工程师给您提供帮助,这个帖子已经归档了。
希望可以帮到您,感谢您的理解,谢谢。
Regards,
Jason Chao
Please remember to mark the replies as answers if they help.
If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.- 已标记为答案 techboyonline 2018年9月4日 1:40