========================================================== ==================================
'Thank you for using the utility program developed by ASP001 studio.
'Http: // WWW. ASP001.NET
'================================================ ============================ 'Asp001 Studio provides customized program development and enterprise Internet expansion services for you
'Qq: 1974229
'E-mail: Shenyangchuqi@tom.com
'Download more programs at HTTP: // WWW. ASP001.NET.
'================================================ ======================================
'Function Introduction: List NT user groups and users
'This function uses ADSI and requires the permissions of the Administrators group.
'Function name: ListGroup (Computer)
'Program development: ASP001 studio ChuQi
'Usage: ListGroup (computer name)
'Example: displays the NT user group and user of 127.0.0.1 computer.
'Listgroup "127.0.0.1"
'================================================ ======================================
Function ListGroup (Computer)
Response. write "<p> <B> The following is the Computer" & Computer & "system user group and user list </B> </p>"
Set ComputerObj = GetObject ("WinNT: //" & Computer)
ComputerObj. Filter = Array ("Group ")
For Each Member in ComputerObj
Response. Write "User Group:" & Member. Name & "<br>"
ListUser Computer, Member. Name
Next
End Function
'List users of a specified user group
Function ListUser (Computer, Group)
Set UserObj = GetObject ("WinNT: //" & Computer & "/" & Group)
For Each Member in UserObj. Members
Response. write "group users:" & Member. Name & "<br>"
Next
End Function