Situatie
Vrei sa creezi o lista cu membrii tuturor grupurilor in ActiveDirectory si sa o exporti intr-un fisier.
Solutie
Pasi de urmat
Te loghezi cu user de administrator pe server.
Deschizi PowerShell si rulezi comanda urmatoare :
$Groups = Get-ADGroup -Filter * -Properties *
$Results = foreach( $Group in $Groups ){
Get-ADGroupMember -Identity $Group | foreach {
[pscustomobject]@{
GroupName = $Group.Name
Name = $_.Name
}
}
}
$results | export-csv -Path C:tempmembers.csv -NoTypeInformation
Leave A Comment?