3.63 is definitely not the way you want to go about doing this, but if you must this will get you started. It doesn't work right now, but it'll give you an idea of what you need to do:
code:
$objRoot = OleGetObject(0, "LDAP://RootDSE")
$strDefaultDomainNC = OLECALLFUNC($objRoot, "Get", "s", "DefaultNamingContext")
? $strDefaultDomainNC
sleep 2
$ComputerName = "CN=ComputerName"
If $strDefaultDomainNC = ""
? "Error. Did not get the Default Naming Context"
EndIf
$strADSQuery = "SELECT Name, AdsPath FROM 'LDAP://" + $strDefaultDomainNC + "' WHERE Name = '" + $ComputerName + "'"
$objADOConn = OlecreateObject("ADODB.Connection")
OlePutProperty($objADOConn, "Provider", "s", "ADsDSOObject")
OleCallProc($objADoConn, "Open", "s", "Active Directory Provider")
;***********************
;This is where it gets sticky. Good luck.
;$objQueryResultSet = OleCreateObject("ADODB.Recordset")
$objQueryResultSet = OleCallFunc($Connection, "Execute", "s", "$strADSQuery")
? OleGetProperty($objQueryResultSet, "EOF")
If OleGetProperty($objQueryResultSet, "EOF")
? "Computer " + $ComputerName + " was not found")
EndIf
While Not OleGetProperty(objQueryResultSet, "EOF")
? "Path = " + OleGetProperty($objQueryResultSet.Fields("AdsPath") ; You'll need the 3.63 code to get a field recordset value, you can find an example somewhere on the board.
OleCallProc(objQueryResultSet, "MoveNext")
Loop