Get the App
SLTechnology News&Howtos  ›  Servers  › 

Powershell views the number of members of all security groups and distribution groups

Shulou Source: shulou.com Published: 2022-06-02 12:53:20 10月03日 Update

Distribution groups, mail groups, security groups are very many, how to check the number of group members at one time, use the following script to check.

$group=Get-ADGroup-Filter-SearchBase 'cn=users,dc=test,dc=com'-Properties

Foreach ($adgroup in $group) {

Write-Host $adgroup.samaccountname,$adgroup.member.count

}

Tags: Security quantity Communication Distribution Group one-time Group member script Mail member Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno MariaDB Apple Microsoft vpn Huawei