如何在ADSI中查询用户属性?

(编辑:jimmy 日期: 2025/3/16 浏览:2)

如何在ADSI中查询用户属性?


<%
Dim x

On error resume next
'Set x = GetObject("WinNT://kenfilszwin2k/allen")
strLDAP="LDAP://kenfilszwin2k/CN=Allen He,OU=kenfilsz,dc=kenfilsz,dc=com"

set x=getobject(strLDAP)
Response.Write "Object Name: " & x.Name & "<br>"
Response.Write "Object Class: " & x.Class & "<br>"

Set cls = GetObject(x.Schema)
For Each op In cls.MandatoryProperties

' 返回用户对象必须设置的属性
  v = x.Get(op)
  Response.Write "必须设置:"& op & "=" &v & "<br>"
Next
For Each op In cls.OptionalProperties

' 返回用户对象可选的属性
  v = x.Get(op) 
  Response.Write "可选:"& op & "=" &v & "<br>"
Next
set cls=nothing
set x=nothing
response.end
%>

一句话新闻

Windows上运行安卓你用过了吗
在去年的5月23日,借助Intel Bridge Technology以及Intel Celadon两项技术的驱动,Intel为PC用户带来了Android On Windows(AOW)平台,并携手国内软件公司腾讯共同推出了腾讯应用宝电脑版,将Windows与安卓两大生态进行了融合,PC的使用体验随即被带入到了一个全新的阶段。