欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

PowerShell获取Exchange通讯组属性

程序员文章站 2023-12-30 16:04:16
...

取单个通讯组属性

Get-DistributionGroup -identity it.tsg -ResultSize Unlimited |`
 Select Name,Displayname,GroupType,PrimarySmtpAddress,`
 @{n='RejectMessagesFromSendersOrMembers';e={$_.RejectMessagesFromSendersOrMembers-join';'}},`
 @{n='RejectMessagesFrom';e={$_.RejectMessagesFrom-join';'}},`
 @{n='RejectMessagesFromDLMembers';e={$_.RejectMessagesFromDLMembers-join';'}}`
  | Export-Csv D:\scripts\group.csv -NoTypeInformation -Encoding Default

获取所有通讯组属性

Get-DistributionGroup -ResultSize Unlimited |`
 Select Name,Displayname,GroupType,PrimarySmtpAddress,`
 @{n='RejectMessagesFromSendersOrMembers';e={$_.RejectMessagesFromSendersOrMembers-join';'}},`
 @{n='RejectMessagesFrom';e={$_.RejectMessagesFrom-join';'}},`
 @{n='RejectMessagesFromDLMembers';e={$_.RejectMessagesFromDLMembers-join';'}}`
  | Export-Csv D:\scripts\group.csv -NoTypeInformation -Encoding Default

您也可以参考如下微信公众号获取更多资讯
PowerShell获取Exchange通讯组属性

转载于:https://blog.51cto.com/543925535/2368493

上一篇:

下一篇: