Monday 22 January 2018

How Can I tell if the current user is Admin from Windows Command Line


Is there anything I can call from the command line which will tell me if the currently logged in user has a limited account or is an admin?



Answer



With the default command tools (no third party downloads) you can use the net command.


%username% will have the username of the current logged on user, so I would use:


net user "%username%"


To display information about the current logged on user. The last section of this shows:


Local Group Memberships      *Administrators       *HelpLibraryUpdaters
*HomeUsers
Global Group memberships *None

Hope this helps


No comments:

Post a Comment

Where does Skype save my contact's avatars in Linux?

I'm using Skype on Linux. Where can I find images cached by skype of my contact's avatars? Answer I wanted to get those Skype avat...