13

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
  • You do understand that a domain level permission would override any local permissions you might assign a local profile right?
    – Ramhound
    Oct 21, 2013 at 17:57
  • @Ramhound Seems like he's concerned with domain users, not local users. He understands how to check a local account, but not how to check if a domain account is a local admin from the command line.
    – rtf
    Oct 21, 2013 at 19:44
  • Correct. I was just looking for command line shortcuts for things I was already doing. Oct 21, 2013 at 20:03

3 Answers 3

20

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.

2
  • Exactly what I was looking for! Thank you sir. Oct 21, 2013 at 17:57
  • That answer just give local admin membership. It does not "tell if a domain user is a local admin on the machine"
    – PollusB
    Nov 13, 2023 at 17:15
7

Try

C:\>NET USER SomeUser /domain

instead of

C:\>NET USER MYDOMAIN\SomeUser
1
  • Since this question has already has an accepted answer you need to give more detail as to why your method is a more suitable option. Oct 21, 2014 at 14:03
1

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

GPRESULT -Z /USER [username]

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .