怎样在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
%>