如何在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
%>

华山资源网 Design By www.eoogi.com
广告合作:本站广告合作请联系QQ:858582 申请时备注:广告合作(否则不回)
免责声明:本站资源来自互联网收集,仅供用于学习和交流,请遵循相关法律法规,本站一切资源不代表本站立场,如有侵权、后门、不妥请联系本站删除!
华山资源网 Design By www.eoogi.com