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

DotNetBag
.NET Development Newsgroups

HTVi
TV Discussion Newsgroups

Our Hot Pick: Rising Antivirus 2006 - Certified by TUV & Checkmark! Get 10% discount by entering this coupon code: ONDISCOUNT10
Rising Antivirus 2006

EnumLocalGroup.vbs - how to enumate all groups
Mack <mbarss[ at ]shaw.ca> 10.07.2007 21:16:27
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> 10.07.2007 23:05:46
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