如何在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
' 返回用戶對象必須設(shè)置的屬性
v = x.Get(op)
Response.Write "必須設(shè)置:" 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
%>