ASP列出NT用户组及用户
2018-09-06 11:33
=============================================================
函数介绍:列出NT用户组及用户
本函数使用ADSI,需要Administrators组用户权限
函数名称:ListGroup(Computer)
用法:ListGroup(计算机名称)
例:显示127.0.0.1计算机NT用户组及用户
ListGroup 127.0.0.1
=============================================================
Function ListGroup(Computer)
response.write <p><b>以下为计算机Computer系统用户组及用户列表</b></p>
Set ComputerObj = GetObject(WinNT://Computer)
ComputerObj.Filter = Array(Group)
For Each Member in ComputerObj
Response.Write 用户组:amp;<br>
ListUser Computer,Member.Name
Next
end Function
列出指定用户组用户
Function ListUser(Computer,Group)
Set UserObj = GetObject(WinNT://Computer/Group)
Response.write nbsp;nbsp;nbsp;nbsp;组中用户:Member.Name <br>
Next
End Function