Answer the question
In order to leave comments, you need to log in
How to upload user rights in AD groups as a table?
Tell me how to unload the table of access rights from AD and with what:
_______Group1_|_Group2_|_Group3
User1____+_____|___________|___+____
User2__________|_____+_____|_______
User3____+_____|___________|_______
?
Answer the question
In order to leave comments, you need to log in
I write from memory, without the possibility of checking:
Import-Module ActiveDirectory
$userList = Get-Aduser -Filter *
foreach($user in $userlist)
{
[array]$userGroups = Add-ADPrincipalGroupMembership -Identity $user.samaccountname
$result = $user.samaccountname + "`t" + $user.displayName + "`t" + ($userGroups.name -join "; ")
Out-file -InputObject $result -FilePath "C:\result.csv" -Append # Если в файл вывод не нужен, то "Write-Host $result"
}
write the script yourself, there are probably a bunch of commands in the power shell for working with hell, including finding out which group the user is in.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question