$groups = Get-ADGroup -Filter *
$groupSamAccountName = $groups | select-object -expandproperty SamAccountName
$groupDistinguishedName = $groups | select-object -expandproperty DistinguishedName
$groupMemberCount = $groups
$groupDescription = $groups | select-object -expandproperty Description
Get Groups from Active Directory using Powershell
Leave a reply