User Group Membership – Quick Query
You sometimes need to know the Active Directory domain group memberships of a user currently logged in to a Windows computer. Mostly, you need this information for troubleshooting purposes.
The easiest way is using the following command line query:
net user /domain %username%
Example
C:\>net user /domain %username% User name varadmin Full Name Varuna Admin Comment User's comment Country/region code 000 (System Default) Account active Yes Account expires Never Password last set 22.01.2016 10:09:53 Password expires Never Password changeable 23.01.2016 10:09:53 Password required Yes User may change password Yes Workstations allowed All Logon script User profile Home directory Last logon 22.03.2020 18:08:15 Logon hours allowed All Local Group Memberships *ADSyncAdmins Global Group memberships *NoSpamProxy People an*NoSpamProxy Monitorin *Foresite_Admins *Compass_Admins *NoSpamProxy Disclaime*Enterprise Admins *Mailscape_Users *Group Policy Creator *Organization Manageme*Compass_Users *Foresite_Users *Mailscape_Admins *Schema Admins *Domain Admins *NoSpamProxy Configura*Domain Users The command completed successfully.
Enjoy.