If you want to find out what AD group am I in or members of ad groups, there are different ways to get active directory groups using PowerShell.
In this article, I will explain the best possible way to find active directory group I am in or member of ad groups using PowerShell.
You can get list of ad groups you are member of using ADUC ( Active Directory Users and Computers), PowerShell Get-ADUser and Get-ADGroup cmdlets, command-line tool.
Find AD Groups I’m memberof using ADUC
Active Directory Users and Computers (ADUC) is a GUI approach to find active directory groups you belong to.
Follow the below steps to use ADUC to find ad groups
Step1 – Open ADUC using
dsa.msc command in Run
Step2 – Click on the Users folder having all users in it
Step3 – Select user name to view ad groups member of
Step4 – Right-click on the user account and click “Properties”
Step5 – Click on “Member of” Tab to view ad groups
Get List of AD Groups User Belong Using PowerShell
If you want to get list of ad groups user belong to using PowerShell, run the below command
(Get-ADUser toms -Properties MemberOf).memberof | Get-ADGroup | Select-Object name
The second command uses Get-ADGroup cmdlet to gets list of ad groups user belong to and displays ad groups name on the console as below
name ---- Group Policy Creator Owners Domain Admins Enterprise Admins Schema Admins Administrators
Cool Tip: How to use net user command in cmd!
Find Out AD Groups I am in using Cmd
If you want to find out ad groups I am in using command line, use
gpresult command-line tool to get resultant set of policy of user in active directory, run below command
Above command in command prompt, get set of policy applied for given user. /v option is to get detailed verbose information as below
Cool Tip: Using set-adgroup modify active directory group attributes PowerShell!
I hope the above article to find out ad groups I am member of or user belong to helpful to find your ad groups.
You can find more topics about PowerShell Active Directory commands and PowerShell basics on ShellGeek home page.