This is simply for my personal reference as I am always confused on finding it as part of my projects, and I always forget what to search. So the answer is just a copy from Server Fault Type dsquery /? in a command prompt.
Tag: active directory
How to export group memberships of Active Directory users into CSV format..
So I started a new job recently, and I am working on a as-is migration. I needed to export the list of AD users and their group memberships into human readable format. So this is how I did it. $users = Get-ADUser -Filter * foreach ($user in $users) { $Groups = (Get-ADPrincipalGroupMembership -Identity $user.SamAccountName | […]