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

284

Solution 1

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.

Solution 2

Try

C:\>NET USER SomeUser /domain

instead of

C:\>NET USER MYDOMAIN\SomeUser

Solution 3

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

GPRESULT -Z /USER [username]
Share:
284

Related videos on Youtube

Ajith
Author by

Ajith

Updated on September 18, 2022

Comments

  • Ajith
    Ajith over 1 year

    I have above 50,000 rows of data in my excel sheet. It makes too much of time to insert the data into database table because it runs in for loop(spring boot for backend). Can some one suggest me the best for way for insert the data into database from excel in sql query.

    • Ramhound
      Ramhound over 10 years
      You do understand that a domain level permission would override any local permissions you might assign a local profile right?
    • rtf
      rtf over 10 years
      @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.
    • Mike Christensen
      Mike Christensen over 10 years
      Correct. I was just looking for command line shortcuts for things I was already doing.
    • Rajesh
      Rajesh about 3 years
      you're using spring data JPA or spring JDBC?
    • Ajith
      Ajith about 3 years
      we are using JPA
    • Rajesh
      Rajesh about 3 years
      First read data from excel and added to POJO List and use repository.saveAll()
    • Ajith
      Ajith about 3 years
      Thanks for your effort. Can i get some regards as you mentioned. Because i am new to this language
    • Rajesh
      Rajesh about 3 years
      Check the answer
  • Mike Christensen
    Mike Christensen over 10 years
    Exactly what I was looking for! Thank you sir.
  • Matthew Williams
    Matthew Williams over 9 years
    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.
  • Ajith
    Ajith about 3 years
    Thanks for effort. Actually we have using java spring boot as backend. So it is not possible in using node js.
  • Chamikara Samarasekara
    Chamikara Samarasekara about 3 years
    But we did 1 million rows within 10 minutes using nodejs app (ram 512, 1 cpu)