Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

List All Members of each Group

Status
Not open for further replies.

pbanacos

IS-IT--Management
Apr 21, 2006
34
US
I need help converting this too loop statements below to jscript:

strComputer = "."
Set colGroups = GetObject("WinNT://" & strComputer & "")

For Each objGroup In colGroups
Wscript.Echo objGroup.Name
For Each objUser in objGroup.Members
Wscript.Echo vbTab & objUser.Name
Next
Next

--------------------------------------------
var colGroups = GetObject("WinNT://");

var enumItems = new Enumerator(colGroups);
For (; !enumItems.atEnd(); enumItems.moveNext()){
Wscript.Echo (+objGroup.Name);
var enumItems = new Enumerator(Members);
For (; !enumItems.atEnd(); enumItems.moveNext()){
For( ){
Wscript.Echo (+objUser.Name);
}
}

Any help would be much appreciated!

Thank You
 
[1] What is this moniker? "WinNT://."? Does the first script work? Why translate a wrong script?
[2] Why then you decide the dot (".") no longer needed in the second version whatever it's correct or not in the first version? and then you decide again bare "Members" will know what object exposes Members collection?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top