=============================================================
'感謝您使用ASP001工作室開發的實用函數程序
'HTTP://WWW.ASP001.NET
'============================================================='ASP001工作室為您提供訂製程序開發、企業互聯網拓展服務
'QQ:1974229
'E-Mail:[email protected]
'更多程序下載請到HTTP://WWW.ASP001.NET
'=============================================================
'函數介紹:列出NT用戶組及用戶
'本函數使用ADSI,需要Administrators組用戶權限
'函數名稱:ListGroup(Computer)
'程序開發:ASP001工作室ChuQi
'用法:ListGroup(計算機名稱)
'例:顯示127.0.0.1計算機NT用戶組及用戶
'ListGroup"127.0.0.1"
'=============================================================
FunctionListGroup(Computer)
response.write"<p><b>以下為計算機"&Computer&"系統用戶組及用戶列表</b></p>"
SetComputerObj=GetObject("WinNT://"&Computer)
ComputerObj.Filter=Array("Group")
ForEachMemberinComputerObj
Response.Write"用戶組:"&Member.Name&"<br>"
ListUserComputer,Member.Name
Next
endFunction
'列出指定用戶組用戶
FunctionListUser(Computer,Group)
SetUserObj=GetObject("WinNT://"&Computer&"/"&Group)
ForEachMemberinUserObj.Members
Response.write"組中用戶:"&Member.Name&"<br>"
Next
EndFunction