I've been using PSExec.exe to run a vbscript on a few hundred remote virtual machines. This is generally working. However, on a small group of VM's, I get this error:
MyScriptName.vbs(24, 5) WScript.CreateObject: Could not create object named "ADODB.Connection"
Here is the offending line of code in the vbscript file:
Set oConn = WScript.CreateObject("ADODB.Connection")
I have tried this (for 64-bit cscript.exe):
PsExec.exe \\RemoteVMName -c -h -u MyDomain\MyWinLogin -p MyPwd cscript.exe "\\UncPath\To\My\Script.vbs"
And I tried this (for 32-bit cscript.exe):
PsExec.exe \\RemoteVMName -c -h -u MyDomain\MyWinLogin -p MyPwd C:\Windows\SysWOW64\cscript.exe "\\UncPath\To\My\Script.vbs"
Curiously, if I log into the remote VM, I can manually run the vbscript file. It succeeds with no script errors. What could be causing that vbscript error?