Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
I have this VBS script which works:
code:
''''''''''''''''''''''''''''''''''''''' 'Bind ''''''''''''''''''''''''''''''''''''''' Set user = GetObject("LDAP://amdc005/OU=1114, OU=NCS,OU=Organizations,DC=us,DC=tycoelectronics,DC=com") user.GetInfoEx Array("canonicalName"), 0 count = user.PropertyCount strText = "Canonical Name: " & user.Get("canonicalName") & " Count of properties in cache" & count If (Err.Number <> 0) Then BailOnFailure Err.Number, "on Get method" End If show_items strText, sComputer
''''''''''''''''''''''''''''''''''''''' 'Display subroutines ''''''''''''''''''''''''''''''''''''''' Sub show_items(strText, strName) MsgBox strText , vbInformation, "Get canonicalName" End Sub
Sub BailOnFailure(ErrNum, ErrText) strText = "Error 0x" & Hex(ErrNum) & " " & ErrText MsgBox strText, vbInformation, "ADSI Error" WScript.Quit End Sub
and this KiXtart script which does not:
It appears that the GetInfoEx method does not return an error but does not repopulate the property cache.
I cant get this to work in Kixtart. imho, this should be a simple convert, but cant understand why GetInfoEx isn't populating the cache. Almost as if there is something buggy about the array being passed ... recommend you flag this as a bug in the beta forum.