Trilight Zone Forum Index Trilight Zone
Privacy & Anonymity is our specialty !
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Remote Enumeration of Localgroups

 
Post new topic   Reply to topic    Trilight Zone Forum Index -> windows
Author Message
digital8
Second Lieutenant


Joined: 29 Sep 2005
Posts: 1002

PostPosted: Fri Oct 07, 2005 11:23 am    Post subject: Remote Enumeration of Localgroups Reply with quote

I am looking for a way to remotely enumerate membership of localgroups. I have been successful in getting the group names via WMI but not the members. Can anybody point me in the right direction?





Const ForReading = 1, ForWriting = 2, ForAppending = 8

Dim fso, f
Dim GroupString
Dim WorkStation

GroupString = "<local group>"
WorkStation = "<machine name>"

Set fso = CreateObject("Scripting.FileSystemObject")
Set f = fso.OpenTextFile(AdminLog, ForAppending, True)

f.WriteLine(Workstation)

Set GroupObj = GetObject("WinNT://" & Workstation & "/" & GroupString)
For each UserObj in GroupObj.Members
f.WriteLine(" " & UserObj.AdsPath)
Next
f.Close
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Trilight Zone Forum Index -> windows All times are GMT
Page 1 of 1

 


Powered by phpBB © 2001, 2005 phpBB Group