I would like to execute a remote program via BP that needs elevation.
On the console logged in as domain admin that works with psexec when I pass the domain admin account:
psexec \computer -u domainAdministrator -p XXXXX -h cmd /c \serverprogramupdate.exe silent update
I can also execute a local cmd script which contains the line:
\serverprogramupdate.exe silent update
psexec \computer -u domainAdministrator -p XXXXX -h cmd.exe /c "C:Program Filesupdate.cmd“
which works also fine.
But if I run psexec without -u domainAdministrator -p XXXXX at the command shell I get „Access denied“ error code 1
The same is when deploying the cmd script with BatchPatch. The Remote Execution Context is changed to Elevated token. In the log I can see:
Di-08:02:13> Remote Command: Exit Code: 1
Di-08:01:52> Remote Command: Executing \computer -h cmd.exe /c “c:Program FilesBatchPatchdeploymenttempupdate.cmd”
Di-08:01:52> Remote Command: Establishing connection…
Di-08:01:52> Remote Command: Queued…
The script is successfully deployed to the deployment directory of the remote computer. But still I get exit code 1.
The same when I use Remote Process User defined command:
cmd.exe /c "c:Program FilesBatchPatchdeploymenttempRunMegaReplace.cmd"
My windows login account that runs BatchPatch is the Domain Admin. The -h switch seems not enough.
How can I run this task in BP. I can’t find a way to pass the -u -p switch for psexec.
—
Mark