http://dieseyer.de • all rights reserved • © 2011 v11.4
'*** v8.1 *** www.dieseyer.de *******************************
'
' Datei: lokalegruppen.vbs
' Autor: dieseyer@gmx.de
' Auf: www.dieseyer.de
'
' Microsoft: The Portable Script Center - v3.0, Nov. 2004
' "List Local Groups and Their Members"
'
'************************************************************
Option Explicit
Dim strComputer
strComputer = "."
strComputer = "atl-win2k-01"
strComputer = WScript.CreateObject("WScript.Network").ComputerName
MsgBox "Auf """ & strComputer & """ vorhandene lokale Gruppen und deren Mitglieder:" & vbCRLF & LokaleGruppen( strComputer ), , WScript.ScriptName
WScript.Quit
'*** v8.1 *** www.dieseyer.de ****************************
Function LokaleGruppen( PCname )
'*********************************************************
Dim colGroups : Set colGroups = GetObject("WinNT://" & strComputer & "")
Dim objGroup, objUser
Dim i, Txt
colGroups.Filter = Array("group")
For Each objGroup In colGroups
i = i + 1
Txt = Txt & vbCRLF & i & " - " & objGroup.Name
For Each objUser in objGroup.Members
Txt = Txt & vbCRLF & vbTab & objUser.Name
Next
' MsgBox Txt, ,"Gruppe " & i
Next
' MsgBox Txt, , "ENDE"
LokaleGruppen = Txt
End Function ' LokaleGruppen( PCname )
http://dieseyer.de • all rights reserved • © 2011 v11.4