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

来源:asp之家 时间:2010-01-18 20:54:00 

domainname.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   
' 校验有效域
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>"
%>

标签:服务器,用户
0
投稿

猜你喜欢

  • js中使用使用原型(prototype)定义方法的好处详解

    2024-04-22 13:03:54
  • python 线性回归分析模型检验标准--拟合优度详解

    2022-07-24 08:29:49
  • Python自动化实战之接口请求的实现

    2021-01-15 15:44:58
  • 网页常用特效整理:中级篇

    2013-07-15 13:43:32
  • asp下用OracleInProcServer完成对Oracle的连接和操作

    2008-04-13 07:10:00
  • 使用Pandas将inf, nan转化成特定的值

    2023-04-15 23:36:33
  • python中实现指定时间调用函数示例代码

    2021-04-20 07:14:25
  • Oracle 存储过程教程

    2009-10-24 18:05:00
  • XML to DDL的项目关键:与数据库同步

    2008-05-29 14:19:00
  • asp会员系统如何实现“忘记密码”

    2007-09-19 12:17:00
  • Python实现带参数的用户验证功能装饰器示例

    2023-05-15 01:34:05
  • 选择一个优秀正文字体的15个技巧

    2008-03-20 13:36:00
  • python爬取网易云音乐热歌榜实例代码

    2023-12-19 09:14:32
  • Android基于TCP和URL协议的网络编程示例【附demo源码下载】

    2021-08-26 03:18:55
  • 浅谈Python2.6和Python3.0中八进制数字表示的区别

    2023-04-22 23:56:42
  • ZeroClipboard.js使用一个flash复制多个文本框

    2024-04-27 15:19:14
  • Python全局锁中如何合理运用多线程(多进程)

    2022-05-27 18:58:22
  • 十个Python程序员易犯的错误

    2023-11-27 03:43:13
  • Python人工智能深度学习模型训练经验总结

    2022-01-05 18:10:50
  • 史上最详细的Python打包成exe文件教程

    2021-07-19 06:30:16
  • asp之家 网络编程 m.aspxhome.com