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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

What does the following script do?

Status
Not open for further replies.

123457

Programmer
Mar 9, 2002
4
AZ
What does the following script do?
i = 0
Set oPcdUsers = GetObject("WinNT://PCD-CANADA/Domain Users")
For Each oUser in oPcdUsers.Members
i = i + 1
Next
Wscript.Echo i
 
It looks to count the number of members in the Domain Users group on PCD-CANADA.

IIRC, it would have been simpler to

Set oPcdUsers = GetObject("WinNT://PCD-CANADA/Domain Users")
WScript.Echo oPcdUsers.Members.Count Jon Hawkins
 
I doesn't look to count but enumerate all users in the Domain Users group.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top