标签:批量为通讯组添加rejectmessagesfromsendersormembers成员
批量为通讯组添加RejectMessagesFromSendersOrMembers成员,此操作不会覆盖原来的配置,只是增加
$groups= Get-DistributionGroup -ResultSize unlimited
foreach($group in $groups) {
$current= $group.RejectMessagesFromSendersOrMembers
$current+= ‘RejectSendEmailToGroup‘
Set-DistributionGroup$group -RejectMessagesFromSendersOrMembers $current
如果想直接覆盖原来的配置可使用以下脚本
$RejectGroupOrUser="RejectSendEmail"
Get-DistributionGroup | foreach{Set-DistributionGroup -Identity $_.name -RejectMessagesFromSendersOrMembers $RejectGroupOrUser}
本文出自 “黄锦辉专栏” 博客,谢绝转载!
批量为通讯组添加RejectMessagesFromSendersOrMembers成员
标签:批量为通讯组添加rejectmessagesfromsendersormembers成员
原文地址:http://stephen1991.blog.51cto.com/8959108/1744786