Lists attributes of a the group object on the local computer.

Visual Basic
Edit|Remove
Set objNetwork = CreateObject("WScript.Network")
strComputer = objNetwork.ComputerName
strGroup = "Administrators"
WScript.Echo "Computer: " & strComputer
Set objGroup = GetObject("WinNT://" & strComputer & "/" & strGroup & ", group")
Set objClass = GetObject(objGroup.Schema)
WScript.Echo "Mandatory attributes:"
For Each strProperty In objClass.MandatoryProperties
  WScript.Echo strProperty
Next
Wscript.Echo
WScript.Echo "Optional attributes:"
For Each strProperty In objClass.OptionalProperties
  WScript.Echo strProperty
Next