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

栏目: 编程语言 · 发布时间: 7年前

内容简介:如何取得服务器上的用户组列表?

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

[1]


以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持 码农网

查看所有标签

猜你喜欢:

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

注意力商人

注意力商人

吳修銘 / 黃庭敏 / 天下雜誌 / 2018-4-2 / NT$650

電子郵件,免費!照片分享,無上限! 你是否想過,隨手可得的免費內容、便利的免費服務,到底都是誰在付費? 如果商品免費,那你就不是消費者,而是商品! 你我可能都不知不覺地把自己賣給了注意力商人! 「『媒體轉型、網路演化與資訊浪潮」此一主題最具洞見的作者。』──黃哲斌(資深媒體人) 「這是少有的關注產業發展的傳播史,對現在或未來的『注意力產業』」中人來說,不可不讀。」──......一起来看看 《注意力商人》 这本书的介绍吧!

CSS 压缩/解压工具
CSS 压缩/解压工具

在线压缩/解压 CSS 代码

Markdown 在线编辑器
Markdown 在线编辑器

Markdown 在线编辑器

RGB HSV 转换
RGB HSV 转换

RGB HSV 互转工具