How to tell if a domain user is a local admin on the machine

I'd like to know if the user MYDOMAIN\SomeUser has local admin rights on the current machine.

I can see if a local user account has admin by using:

C:\>NET USER Mike
User name Mike
Full Name
...
Local Group Memberships *Administrators

However, if I try:

C:\>NET USER MYDOMAIN\SomeUser

or:

C:\>NET USER "MYDOMAIN\SomeUser"

I get the standard syntax help screen.

I can check this from the "Computer Management" MMC snap-in, but that takes too long to load and I'd like to quickly do this from the command line. If someone has a VBS script that'd be fine too.

Note: If anyone has better tags for this question, please feel free to add them!

3

3 Answers

Try net localgroup administrators instead. If you'd like a PowerShell command to check a specific user, take a look at this blog post. I would hope however that there aren't so many local administrators that you can't spot the user in question.

1

Try

C:\>NET USER SomeUser /domain

instead of

C:\>NET USER MYDOMAIN\SomeUser
1

Try this command to get all information of the user. it's a powershell command.

GPRESULT -Z /USER [username]

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like