I am trying to run a powershell command like this:
psexec \\MachineB "\\MachineB\drops\Func2WebSiteOnline.bat"
I get this error:
PsExec could not start \\MachineB\drops\Func2WebSiteOnline.bat on MachineB: Access is denied.
I have tried the following things:
Neither of those help. However, I can run simple commands against machineB like this:
psexec \\MachineB net stop dcache
and that works just fine.
Any thoughts on how I can run that batch file above against MachineB?
Thanks
I found a somewhat unconventional way to solve it.
psexec \\MachineB -u domain\user -p password cmd /c "cd /d I:\drops\Func2 && func2web.bat"