' List Members of a Local Group
Set objNetwork = CreateObject("WScript.Network")
strComputer = objNetwork.ComputerName
strGroup = "Administrators"
WScript.Echo "Computer: " & strComputer
Set objGroup = GetObject("WinNT://" & strComputer & "/" & strGroup & ",group")
WScript.Echo " Administrators group members:"
For Each objMember In objGroup.Members
WScript.Echo " " & objMember.Name
Next