Jump to content

How to check privilege of user?


Recommended Posts

Hello Tam,

 

Unfortunately our program doesn't collect this information in the current version. But we will add such possibility in the next version.

Our apologies for the inconvenience.

Hello Support,

 

Thanks for your reply, but do you know how to list all user belong to Administrators Local Group and Power Users Local Group? (such as run by other tools or command line of Microsoft?)

 

Tam

Link to comment
Thanks for your reply, but do you know how to list all user belong to Administrators Local Group and Power Users Local Group? (such as run by other tools or command line of Microsoft?)

Yes, it can be done by running a VBScript. Create a file with *.vbs extension (for example UsersGroup.vbs) with the following text (lines starting with apostrophe are comments):

'Set the computer name. Dot means local PC, and a network name of remote computer can be used.
strComputer = "."
strUsers = ""
'Replace "/Administrators" with "/Power Users" to view that group's users.
Set colAccounts = GetObject("WinNT://" & strComputer & "/Administrators")
For Each objUser In colAccounts.Members
 strUsers = strUsers & objUser.Name & vbCrLf
Next
'Uncomment the following four lines to get both Administrators and Power Users at the same time
'Set colAccounts = GetObject("WinNT://" & strComputer & "/Power Users")
'For Each objUser In colAccounts.Members
'  strUsers = strUsers & objUser.Name & vbCrLf
'Next
Wscript.Echo strUsers

If you run this file just double-clicking on it, it will show you a message box. It's text can be copied by pressing "Ctrl+C" in the box itself.

If you need a console output, run the following command:

csript //NoLogo UsersGroup.vbs

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...