Title: Message
OK, I figured it out using your tip on the SAM account:
 
Dim compname
Dim domname
compname = "MYHOSTNAME"
domname = "MYDOMAIN"
 
Set
Set oTrans = CreateObject("NameTranslate")
oTrans.Init 1, domname
oTrans.Set 3, domname &"\"& compname &"$"
sAdsPath = oTrans.Get(1)
Set >Set oTrans = Nothing
wscript.echo "LDAP path: " & sAdsPath

Thanks & greetings,
 
Frederic Allaert
System Engineer
Johnson Pump AB

-----Original Message-----
From: Ken Cornetet [mailto:[EMAIL PROTECTED]
Sent: Thursday, October 16, 2003 3:55 PM
To: [EMAIL PROTECTED]
Subject: RE: [ActiveDir] LDAP'ing a computer object in AD

I think this is what you want. Search for samaccountname=computername$ (append a "$" to the computer name).
-----Original Message-----
From: Frederic Allaert [mailto:[EMAIL PROTECTED]
Sent: Thursday, October 16, 2003 8:50 AM
To: [EMAIL PROTECTED]
Subject: [ActiveDir] LDAP'ing a computer object in AD

Hello all,

I have been searching some good, clear examples how to determine the LDAP path
for a computer object, (without knowing the "location" in AD), with the only input being
the hostname of the computer, and the DNS-name for the domain. All this using a .VBS-script...

Can someone produce such an example, or direct me to some good resource websites on this topic?

Greetings,

Frederic Allaert

Reply via email to