Question : VB script

I have an syntax error in the following string:

      strQuery = "<LDAP://" & strOU & strOU & strDNSDomain & ">;" & strFilter & ";distinguishedName,userAccountControl;subtree"

does anybody find out which=

Answer : VB script

OK - paths looks OK, code looks OK, error being returned is DS path is invalid. AdsPath should return escaped DNs so this should not be a problem. Let see what values are being used. Just for diagnostics can You try to display values for user DN and OU DN like in the snippet below?

(...)
Set objUser = GetObject("LDAP://" & strDN)
Wscript.echo objUser.AdsPath
Wscript.echo "LDAP://OU=03-DISABLED-USERS,OU=93-DISABLED-OBJECTS," & strDNSDomain
Set objNewOU = GetObject("LDAP://OU=03-DISABLED-USERS,OU=93-DISABLED-OBJECTS," & strDNSDomain)
objNewOU.MoveHere objUser.ADsPath, vbNullString
(...)
Random Solutions  
 
programming4us programming4us