Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

list members of the local administrators group

Status
Not open for further replies.

jlfiller

Technical User
May 22, 2001
80
0
0
US
I am looking for a way to get a list of local users who are members of the group Administrators on my Windows XP Pro desktops. I have found a student who made himself a member of this group so now I need to check about a hundred other machines. If I could pull this list using the login script, maybe name the file with the computer's name and store it on the server, that would GREATLY simplify my job.

Anybody have a suggestion as to how to accomplish this without visiting every machine?

JL Filler,Wilton Public Schools, Wilton CT
 
net localgroup administrators?

Use something like psexec (part of pstools, freeware from to submit a job on each machine to run the above command? Psexec's output can be on the machine submitting the job. You could pipe its output to a separate text file for each machine if you wanted hard copy (eg net localgroup administrators > machinename.txt)
 
I think I figured it out. I added the following to the login script:

net use i: //server/share
IF %OS% = Windows_NT net localgroup administrators >I:\localadm\%COMPUTERNAME%.txt

It seems to be working. At least I already have a few files!

JL Filler,Wilton Public Schools, Wilton CT
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top