Werbung: SecurityConsole.de verwaltet Ihre Computer mit Security Essentails aus der Cloud!
30 Tage kostenfrei testen und 20% Rabatt für Ihre Bestellung mit Promocode: WBF2685582
(Promocode gültig bis 31.12.2011)

Group:  English: Windows Server » microsoft.public.windows.server.scripting
Thread: EnumLocalGroup.vbs - how to enumate all groups

HTVi
TV Discussion Newsgroups

EnumLocalGroup.vbs - how to enumate all groups
Mack <mbarss[ at ]shaw.ca> 7/10/2007 9:16:27 PM
I was looking at the "EnumLocalGroup.vbs" script on Richard Mueller's
site. The description indicates that it can be "It can be revised to
document membership in any local group."

What would I need to change to have it enumerate any group?

' Bind to local Administrators group.
Set objLocalGroup = GetObject("WinNT://" & strComputer _
& "/Administrators,group")


I know that the above coding tells it to do the Administrators group.
Would I just neet to code:

Set objLocalGroup = GetObject("WinNT://" & strComputer _
& "/,group")

Or is it more complex?


Malcolm

Re: EnumLocalGroup.vbs - how to enumate all groups
"Michael Harris \(MVP\)" <mikhar.at.mvps.dot.org> 7/10/2007 11:05:46 PM
Mack wrote:
[Quoted Text]
> I was looking at the "EnumLocalGroup.vbs" script on Richard Mueller's
> site. The description indicates that it can be "It can be revised to
> document membership in any local group."
>
> What would I need to change to have it enumerate any group?
>
> ' Bind to local Administrators group.
> Set objLocalGroup = GetObject("WinNT://" & strComputer _
> & "/Administrators,group")
>
>
> I know that the above coding tells it to do the Administrators group.
> Would I just neet to code:
>
> Set objLocalGroup = GetObject("WinNT://" & strComputer _
> & "/,group")
>
> Or is it more complex?


strLocalGroup = "SomeGroupName"
Set objLocalGroup = GetObject("WinNT://" & strComputer _
& "/" & strLocalGroup & ",group")



--
Michael Harris
MVP- Admin Frameworks


Home | Search | Terms | Imprint Contact
Newsgroups Reader - provided by WiredBox.Net
Suche nach Orten, Städten, Postleitzahlen, Vorwahlen, Kfz-Kennzeichen