RSS

check remote server administrator group members

25 Oct

this is a vbs.

Dim objGroup, strComputer
strComputer = "xy-PC"
Set objGroup = GetObject("WinNT://" & strComputer & "/Administrators,group")
Wscript.Echo "Members of local Administrators group on computer " & strComputer
Call EnumGroup(objGroup, "")

Sub EnumGroup(objGroup, strOffset)
Dim objMember
For Each objMember In objGroup.Members
Wscript.Echo strOffset & objMember.Name & " (" & objMember.Class & ")"
If (objMember.Class = "Group") Then
Call EnumGroup(objMember, strOffset & "–")
End If
Next
End Sub

Advertisements
 
Leave a comment

Posted by on October 25, 2010 in Cmdlets&Tools

 

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: