Powershell views the number of members of all security groups and distribution groups
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
}