Page 1 of 1 1
Topic Options
#84755 - 2001-12-30 02:35 PM AD Informations - LDAP://
Alex.H Offline
Seasoned Scripter

Registered: 2001-04-10
Posts: 406
Loc: France
For those who are or will play with Active Directory an especially LDAP:// object, here's something that you will need to have the following syntax working :
getobject("LDAP:// Target object path ")
the object path MUST BE complete, wildcards and such are not supported. LDAP won't tolerate any error or missing part in the path

On the other hand, it's the only AD object which will support 9x systems without any tweaks

[ 31 December 2001: Message edited by: Alex.H ]

_________________________
? getobject(Kixtart.org.Signature)

Top
#84756 - 2002-01-14 06:42 PM Re: AD Informations - LDAP://
Alex.H Offline
Seasoned Scripter

Registered: 2001-04-10
Posts: 406
Loc: France
Something else i've found :
If you ever wonder what type of object you get from LDAP :
let's start with this path :
$Adpath="cn=username,ou=ou parent,ou=another ou parent,dc=domain,dc=ornanization,dc=com|org|whatever"

In case it's not possible to say if it's a user, a computer or something else, do this :
$adtype=getobject("LDAP://"+$adpath)

$adtype.objectCategory will have the following value :
"cn=person,ou=ou parent, ..."

a final command on it and will got just what we need :
$ADOType=Split(mid($adtype.objectCategory,4),",",1)

$ADOType[0] (don't forget, it's an array) will have this value :
person

and here's a list of the possible value from AD (i'm missing the printers and shared folders entries) :
person
computer
group
container
Organizational-Unit
group-policy-container
link-track-vol-entry
class-store
buildin-domain
domain-policy
lost-and-found

(The * is here to replace specifics entries. Don't ever bother to get what * replace, as there's nearly one entry for each user/computer/...)
domain-*
NTFRS-*
IPSEC-*
Link-*
Foreign-*
DNS-*

[ 14 January 2002: Message edited by: Alex.H ]

_________________________
? getobject(Kixtart.org.Signature)

Top
Page 1 of 1 1


Moderator:  Shawn, ShaneEP, Ruud van Velsen, Arend_, Jochen, Radimus, Glenn Barnas, Allen, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 2312 anonymous users online.
Newest Members
fgarcia, Viginette, ManuvdWielNL, Sir_Barrington, batdk82
17889 Registered Users

Generated in 0.051 seconds in which 0.024 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org