Hello there
using a vb script I am probing a container for objectes.
when i try to msgbox(object.objectclass) it gives a type mismatch error.
though it's supposed to be a string.
code below.
Any ideas?
'code
Set dso = GetObject("LDAP:")
samehname = "domain\useruser"
samehpass = "password"
Set obj1 = dso.OpenDSObject( "LDAP://DC=domain,DC=local", samehname,
samehpass,ADS_SECURE_AUTHENTICATION + ADS_SERVER_BIND)
for each colitem in obj1
msgbox(colitem.name)
for each obj in colitem
msgbox(obj.objectclass)
if obj.objectclass = "organizationalUnit" then
msgbox(obj.name)
end if
next
next