Re: LDAP queries against A.D.
- From: BeauKey <beaukey@xxxxxxxxxxxxxxxxxx>
- Date: Wed, 08 Jun 2005 21:22:31 +0200
Torgeir,
Thanks, this is the solution. I assumed it must be someting linke this.
In the MS doc's of the A.D. schema the attribute 'description' is mentioned as:
CN Description Ldap-Display-Name description Size - Update Privilege Domain administrator or account owner. Update Frequency Whenever the description needs to change. Attribute-Id 2.5.4.13 System-Id-Guid bf967950-0de6-11d0-a285-00aa003049e2 Syntax String(Unicode) <<<<<<<<<<<<<<<<<<<<<<<<<
I was fooled by that.
Thanks!
Torgeir Bakken (MVP) wrote:
BeauKey wrote:
(snip)
cmdSQL="Select description from 'LDAP://10.0.0.1:389/cn=beaukey,cn=Users,DC=nldomain,DC=nl,DC=ema,DC=ad,DC=acmecorp,DC=com'"
Set RSObj = conObj.Execute(cmdSQL)
WScript.Echo RSobj.Fields(0).Value '----------------------------------------------------------
However, when trying to retrieve 'description' I get:
C:\scripts\ldap\ADattribute12.vbs(27, 1) Microsoft VBScript runtime error: Type mismatch
This is the only attribute which cannot retrieved by my script. What is wrong?
Hi,
The description attribute needs some special treatment:
'--------------------8<---------------------- ... ... Set RSObj = conObj.Execute(cmdSQL) arrDescription = RSobj.Fields(0).Value
If IsNull(arrDescription) Then ' no Description value exists strDescription = "" Else For Each strLine In arrDescription strDescription = strDescription & strLine Next End If
WScript.Echo strDescription
'--------------------8<----------------------
.
- References:
- LDAP queries against A.D.
- From: BeauKey
- Re: LDAP queries against A.D.
- From: Torgeir Bakken \(MVP\)
- LDAP queries against A.D.
- Prev by Date: Re: Recursively Searching The Registry
- Next by Date: Finding name of a file in a directory
- Previous by thread: Re: LDAP queries against A.D.
- Next by thread: Im sure this is soooooo Simple
- Index(es):
Relevant Pages
|