I was working on an application migration recently, and wanted to see how many users/computers were in each application Active Directory (AD) group in a specified Organisational Unit (OU):
Find AD Group Membership Count
$Groups = Get-ADGroup -Properties * -Filter * -SearchBase "OU=Applications,DC=alkane,DC=co,DC=uk"
Foreach($group In $groups)
$groupname = $group.Name
$groupdescription = $group.Description
$groupdn = $group.DistinguishedName
$groupcount = $group.member.count