我希望获得Exchange中所有分发列表及其成员的列表?这是否可以使用任何内置的Exchange工具?电源外壳?第三方工具?
@H_502_2@$strFilter = "(&(objectCategory=Group)(|(groupType=2)(groupType=4)(groupType=8)))" $objDomain = New-Object System.DirectoryServices.DirectoryEntry $objSearcher = New-Object System.DirectoryServices.DirectorySearcher $objSearcher.SearchRoot = $objDomain $objSearcher.PageSize = 1000 $objSearcher.Filter = $strFilter $objSearcher.SearchScope = "Subtree" $objSearcher.PropertiesToLoad.Add("cn") | Out-Null $objSearcher.PropertiesToLoad.Add("member") | Out-Null $colResults = $objSearcher.FindAll() foreach ($objResult in $colResults){ $objItem = $objResult.Properties; Write-Output $objItem.cn foreach ($objMember in $objItem.member) { Write-Output " $objMember" } }