RSS

query local administrators group member list

09 Oct

query local administrators group member list should be a very common task for daily administration. here is a method using WMIC remote Call due to it is shipped with Windows XP and Windows 2003.

code

wmic /node:”03r2″ /user:administrator /password:P@ssw0rd path win32_groupuser where (groupcomponent = ‘win32_group.name=”administrators”,domain=”03r2″‘)

wmic /node:”16.157.98.111″ /user:administrator /password:P@ssw0rd path win32_groupuser where (groupcomponent = ‘win32_group.name=”administrators”,domain=”03r2″‘)

change green string to the real pc’s netbios name or IP(recommend)

Screenshot

Tips:

wmic in Windows 5.x is a little different from Windows 6.x. you can try below code which is query local administrators group member ship. It  can success get result in Windows 7 but failed on windows XP or 2003.

wmic path win32_groupuser where (groupcomponent=”win32_group.name=”\administrators\”,domain=\”%computername%\””)

Advertisements
 
2 Comments

Posted by on October 9, 2010 in Cmdlets&Tools

 

Tags:

2 responses to “query local administrators group member list

  1. vivek singh

    November 23, 2015 at 20:13

    get the list of admin users using below command
    wmic -U domain/user //ip “SELECT * FROM Win32_GroupUser”| awk -F'”‘ ‘{print $4 ” : ” $8}’|grep -i Administrators|awk -F’:’ ‘{print $2}’

     

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: