Jump to content


Register a free account to unlock additional features at BleepingComputer.com
Welcome to BleepingComputer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.

Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.


listing members local administrators group

  • Please log in to reply
3 replies to this topic

#1 jvuz


  • Members
  • 3 posts
  • Local time:10:16 AM

Posted 23 February 2011 - 09:00 AM


I need some help with the following. Is there a way to get a list of the members of the local administrators group and write that info in a reg file. That way, I can afterwards launch that file, so the info about the members is put in the registry. That way, this info can get taken by our inventory program and we can have an easy view on who has admin rights. I think it should be possible via a vbs script, but I'm not that good ins vbs scripts. If somebody could help me, it would be really great.


BC AdBot (Login to Remove)


#2 groovicus


  • Security Colleague
  • 9,963 posts
  • Gender:Male
  • Location:Centerville, SD
  • Local time:09:16 AM

Posted 23 February 2011 - 12:54 PM

From Google: 'vbscript get members of a group'

From the same site: 'write to a text file'

Also: 'add members to a group'

That should get you started.

#3 jvuz

  • Topic Starter

  • Members
  • 3 posts
  • Local time:10:16 AM

Posted 24 February 2011 - 02:49 AM


the only thing is, in the first url they talk about using LDAP for searching the members, but I need to do this locally.


#4 Didier Stevens

Didier Stevens

  • BC Advisor
  • 2,685 posts
  • Gender:Male
  • Local time:05:16 PM

Posted 24 February 2011 - 03:15 AM

Look here: http://www.activexperts.com/activmonitor/windowsmanagement/adminscripts/usersgroups/localgroups/
Set strComputer to "." for your own machine.

Didier Stevens

SANS ISC Senior Handler
Microsoft MVP 2011-2016 Consumer Security, Windows Insider MVP 2016-2019


If you send me messages, per Bleeping Computer's Forum policy, I will not engage in a conversation, but try to answer your question in the relevant forum post. If you don't want this, don't send me messages.


Stevens' law: "As an online security discussion grows longer, the probability of a reference to BadUSB approaches 1.0"

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users