Use ASP to list NT user groups and users _ Application Tips
Source: Internet
Author: User
=============================================================
' Thank you for using the utility function program developed by the ASP001 studio
' HTTP://WWW.ASP001.NET
' ============================================================= ' ASP001 studio to provide you with custom program development, corporate Internet Outreach services
' qq:1974229
' E-mail:shenyangchuqi@tom.com
' More programs download please go to HTTP://WWW.ASP001.NET
'=============================================================
' Function Description: List NT user groups and users
' This function uses ADSI and requires Administrators group user rights
' Function name: Listgroup (Computer)
' Program development: ASP001 Studio Chuqi
' Usage: listgroup (computer name)
' Example: Display 127.0.0.1 computer NT user groups and users
' 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 all in ComputerObj
Response.Write "User group:" &Member.Name& "<br>"
Listuser Computer,member.name
Next
End Function
' Lists users of specified user groups
Function Listuser (Computer,group)
Set userobj = GetObject ("winnt://" &Computer& "/" &group)
For all in Userobj.members
Response.Write Users in Group: &member.name & <br>
Next
End Function
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service