ASP学校学生基地,原创基地,ASP优秀程序,定制程序,学校信息化教育整合系统的开始! 设为首页 添加到收藏夹 25175产品
  首页 > ASP技巧指南
        阅读新闻
 

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

[日期:2006-11-16]  来源:http://www.25175.com  作者:25175.com  阅读: 次  [字体: ]

 powered by 25175.net

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

 

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>"
%>



推荐给朋友 】 【 打印此文章 】 【 加入收藏
 

上一篇:如何取得表中字段的属性
下一篇:如何实现人民币的大写转换?

       相关新闻   服务器 

       本文评论   所有评论
 
 

点评: 字数
姓名:

.
网站制作 | 广告服务 | 产品价格 | 汇款方式 | 购买指南 | 程序制作 |
技术支持 | idc.25175.net
Copyright © 2005-2008 25175. All Rights Reserved powered by 25175 | 浙ICP备05022281 | 法律顾问:陈淑丽