Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

powershell get list of groups and members

$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
}
Source by serverfault.com #
 
PREVIOUS NEXT
Tagged: #powershell #list #groups #members
ADD COMMENT
Topic
Name
3+7 =