How can I query user attributes in ADSI?

Source: Internet
Author: User

How ADSI Query user attributes in?


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

'Returns the attributes that must be set for the user object.
V = x. Get (OP)
Response. Write"Required: "& OP &" = "& V &" <br>"
Next
For each op in Cls. optionalproperties

' return the optional attributes of the user object
V = x. get (OP)
response. write " optional : "& OP &" = "& V &"
"
next
set CLS = nothing
set X = nothing
response. end
%>

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.