Highlander
2010-03-16 18:39:40 UTC
Hello All.
Consider the following script:
(watch for word wrap)
strComputer = "atl-ws-01"
strGroup = "Administrators"
Set objGroup = GetObject("WinNT://" & strComputer & "/" & strGroup &
",group")
For Each objUser in objGroup.Members
Wscript.Echo objUser.Name
Next
This script works fine; except if there's a dollar sign ($) in the
group name. Then I get the dreaded "(null): The group name could not
be found."
Using "GetObject WinNT", how can I query a (Windows server) local
group which has a "$" in the group name?
Any help would be greatly appreciated. Thanks!
- Dave
Consider the following script:
(watch for word wrap)
strComputer = "atl-ws-01"
strGroup = "Administrators"
Set objGroup = GetObject("WinNT://" & strComputer & "/" & strGroup &
",group")
For Each objUser in objGroup.Members
Wscript.Echo objUser.Name
Next
This script works fine; except if there's a dollar sign ($) in the
group name. Then I get the dreaded "(null): The group name could not
be found."
Using "GetObject WinNT", how can I query a (Windows server) local
group which has a "$" in the group name?
Any help would be greatly appreciated. Thanks!
- Dave