Home » PowerShell » What Active Directory Groups Am I In?

What Active Directory Groups Am I In?

Use commands whoami /groups and gpresult /r to find out what active directory groups am i in. ADUC snap-in tool provides user groups membership it is a part of.

Active Directory contains groups which are collections of users, computers, and security principals. It is important to know which Active Directory groups you (the user) are in to know which resources like files, printers, folders you are having access to, and permissions.

In this article, we will discuss how to find out what Active Directory groups I am a member of using the Windows commands as well as ADUC GUI.

What Active Directory Groups Am I In using wmoami

Use the command whoami / groups to retrieve the list of groups the user is a member of.

whoami /groups

In the above PowerShell script, whoami /groups command finds out what Active Directory groups I am in. It lists all the groups that the current user is a member of.

The output of the above command is to get the AD groups of which the current user is a member of.

whoami  /groups to get active directory groups for user
whoami /groups to get active directory groups for user

Use gpresult /r to Get Active Directory Groups for the User

To find out what Active Directory groups am I in, use the command gpresult /r. It retrieves the list of AD groups the current user is a member of.

 gpresult /r

The output of the above PowerShell script gets the list of all active directory groups of which the user is a member of.

    The user is a part of the following security groups
    ---------------------------------------------------
        Domain Users
        Everyone
        BUILTIN\Administrators
        Performance Log Users
        BUILTIN\Users
        BUILTIN\Pre-Windows 2000 Compatible Access
        REMOTE INTERACTIVE LOGON
        NT AUTHORITY\INTERACTIVE
        NT AUTHORITY\Authenticated Users
        This Organization
        LOCAL
        Domain Admins
        Group Policy Creator Owners
        Schema Admins
        Enterprise Admins
        Authentication authority asserted identity
        Denied RODC Password Replication Group
        High Mandatory Level

Use ADUC to Find AD Group User is a part of

Use the Active Directory Users and Computers snap-in user interface to find out the groups the user is a member of.

C:\dsa
  • Click on the “User” menu that contains the user accounts.
  • Right-click on the user account and click “Properties”
  • Select the “Member of” tab in the properties dialog.

The output of the above steps results in getting the list of groups the user is a member of as given below.

ADUC - Users Groups
ADUC – Users Groups

Cool Tip: How to find which domain controllers you are connected to in PowerShell!

Conclusion

I hope the above article finds out what Active Directory groups am I in using the Windows commands and ADUC UI.

You can find more topics about PowerShell Active Directory commands and PowerShell basics on the ShellGeek home page.