How to export to a .csv a list of groups a user is a member of in active directory

How to export to a .csv a list of groups a user is a member of in active directory
mjm21Asked:
Who is Participating?
 
Adam BrownSr Solutions ArchitectCommented:
If you can get Powershell 2.0 and the Quest Powershell Cmdlets (available here: http://www.quest.com/powershell/activeroles-server.aspx). The attached code, when run in the Quest ActiveRoles Management Shell, will export what you need. You just need to replace <username> with the user name of the user you want to export stuff for.
(get-qaduser <username>).memberof | foreach {(get-qadgroup -identity $_).name >> c:\groups.csv}

Open in new window

0
 
larry urbanDevOps EngineerCommented:
0
 
mjm21Author Commented:
acbrown - thx worked like a charm
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.