Get Groups from Active Directory using Powershell

$groups = Get-ADGroup -Filter *
$groupSamAccountName = $groups | select-object -expandproperty SamAccountName
$groupDistinguishedName = $groups | select-object -expandproperty DistinguishedName
$groupMemberCount = $groups
$groupDescription = $groups | select-object -expandproperty Description

Leave a comment