如何取得服务器上的用户组列表?

发布时间:2022-04-17 发布网站:脚本宝典
脚本宝典收集整理的这篇文章主要介绍了如何取得服务器上的用户组列表?脚本宝典觉得挺不错的,现在分享给大家,也给大家做个参考。

domainname.asp

<form method="POST">
&nbsp;  
请输入域名:<input tyPE="text" name="DomainName" size="20">
    <input type="submIT" value="
提交" name="B1">
    <input type="reset" value="
重写" name="B2">
</form>
<%
if iSEMpty(request("domainname")) or trim(request("domainname"))="" then
  response.end
end if
DomainString =request("domainname")

on error resume next
Set DomainObj = GetObject("WinNT://" & DomainString)
tmp= DomainObj.MinPasswordLength   

' 校验有效域.
if err<>0 then
  response.write "<Font Color=red>
,连接域"&domainstring&"出错!</Font><br>"
  response.end
end if
%>
<Table border=1 cellpadding=4 width=90% bgcolor=ffffcc>
<tr Align=center>
<td valign=top><B><Font Size=5 Color=Blue>
<%=DomainString%>内的所有组的列表</B></Font>
</td>
</tr>
</table>
<Table border=0 cellpadding=5><tr><td><B><Font Size=3>
组名</Font></B></td><td><B><Font Size=3>描述</Font></B></td></tr>
<%
DomainObj.Filter = Array("group")
For each GroupObj In DomainObj
    If GroupObj.Class = "Group" Then
strInfo=strInfo&"<tr><td><B><Font Size=3>"&GroupObj.Name&"</Font>

</B></td><td><B><Font Size=3>"&GroupObj.Description&"</Font>

</B></td></tr>"
    End If
Next
set DomainObj = Nothing
set GroupObj = Nothing
strInfo=strInfo & "</Table>"
response.write strInfo & "<br>"
response.write "<font size=3><I>" & Now & "</I></Font>"
%>

[1]

脚本宝典总结

以上是脚本宝典为你收集整理的如何取得服务器上的用户组列表?全部内容,希望文章能够帮你解决如何取得服务器上的用户组列表?所遇到的问题。

如果觉得脚本宝典网站内容还不错,欢迎将脚本宝典推荐好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。
标签: