如何在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
%>
最后
以上就是无私冰淇淋最近收集整理的关于如何在ADSI中查询用户属性?的全部内容,更多相关如何在ADSI中查询用户属性内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复