当前位置: 首页 > 图文教程 > 网络编程 > ASP > 取得服务器上用户组列表的脚本之asp版

ASP
asp中常用的文件处理函数
正确处理ASP动态网页中的容错机制
asp自动生成javascript检验函数
如何避免asp的SQL的执行效率低
编译asp应用程序成为exe文件
ASP完成小偷程序机制和简略示例
ASP技巧:rs.getrows方法
ASP简单实现数字字符混合验证码
ASP技巧 挂QQ的网页源代码ASP/PHP
ASP实例:用ASP判断文件地址是否有效
ASP实例:使用ASP生成图片彩色校验码
ASP如何跳出本次进入下一次循环
ASP读取数据库中数据到数组的类
为你的ASP程序作一个负载测试
如何用ASP来获取客户端真实IP的地址
asp脚本运行超时的解决办法
ASP缓存类 【先锋缓存类】Ver2004
ASP动态包含文件的改进方法
ASP中利用application实现缓存
ASP Application 对象用户手册

ASP 中的 取得服务器上用户组列表的脚本之asp版


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-11-03   浏览: 88 ::
收藏到网摘: n/a

 

将下文存为任一asp文件如lg.asp即可.
正文从***下开始
**************************************************
<form method="POST">
    请输入域名:<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    'verify this is a valid domain
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>"
%>