An Engineers Notebook

Get all members of all AD Groups

This isn’t the best looking report but it works…

 

$Groups = Get-ADGroup -Properties * -Filter * -SearchBase "OU=Groups,DC=corp,DC=ourcompany,DC=Com" 
Foreach($G In $Groups)
{
    Write-Host $G.Name
    Write-Host "-------------"
    $G.Members
}

Leave a Reply

Your email address will not be published.