Hi,
I’m trying to run a remote command with logged output from batchpatch. When running the command on psexec it runs fine:
psexec \XXXXX -u XXXXXXadministrator cmd /c “echo . | PowerShell.exe -ExecutionPolicy bypass -File \XXXXXXsoftwarePowerShellpowerhsellscript.ps1”
However when running the command from batchpatch it fails:
echo . | PowerShell.exe -ExecutionPolicy bypass -File \XXXXXXsoftwarePowerShellpowerhsellscript.ps1
The workaround I have found is copying the scirpt to every computer locally and running this remote command:
echo . | PowerShell.exe -ExecutionPolicy bypass -File C:Program FilesBatchPatchpowershellscript.ps1
This is not ideal since I may need to change the scirpt being ran.
Thanks!