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

来源: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
投稿

猜你喜欢

  • 如何批量消除网页超级链接上的“虚线框”

    2008-10-15 12:55:00
  • 使用DW中遇到的常见问题详解

    2008-03-18 16:27:00
  • Varchar与char的区别

    2008-02-28 12:44:00
  • jQuery.sheet – 创建Excel界面风格的jQuery在线应用

    2010-01-27 13:03:00
  • asp 数据库连接函数代码

    2011-04-04 11:08:00
  • display:inline问题小结

    2008-05-01 13:08:00
  • asp中InstrRev的语法

    2008-01-22 18:14:00
  • Dreamweaver表格布局经验谈

    2007-02-03 11:39:00
  • 如何使数据库的ID字段自动加1?

    2010-06-03 10:47:00
  • 如何捕获人家站点的页面?

    2009-11-11 19:19:00
  • asp如何删除数据库中的表或索引?

    2010-06-26 12:23:00
  • 40个网页设计常用小代码

    2008-01-01 19:27:00
  • 如何从ASP连接到Oracle Server?

    2009-11-15 19:52:00
  • SQL“多字段模糊匹配关键字查询”

    2008-04-24 14:16:00
  • 键盘上下键的操作代码(选择)

    2008-06-10 12:28:00
  • JavaScript 解析 Cookie 的函数

    2007-11-08 11:58:00
  • 在MySQL中获得更好的全文搜索结果

    2008-05-09 10:38:00
  • 全文译稿 Windows Internet Explorer 8 性能优化白皮书

    2010-04-23 20:13:00
  • 常用的数据库备份类型有哪些?

    2009-11-01 13:02:00
  • mysql使用LOAD语句批量录入数据方法

    2010-03-09 16:31:00
  • asp之家 网络编程 m.aspxhome.com