Issue with Remote Commands

BatchPatch Forums Home Forums BatchPatch Support Forum Issue with Remote Commands

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #9336
    rherrera
    Participant

    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!

    #11538
    doug
    Moderator

    Thanks for letting us know about this. We’ll see what we can do to address it in the next build.

    -Doug

    #11540
    doug
    Moderator

    The way this will be addressed in the next build is through the Deployment action. You will be able to choose “Actions > Deployment” to deploy a script just like you can already do, but there will be an additional checkbox to “retrieve logged output.” When that box is checked, not only will BatchPatch copy the script from wherever it’s located to the target computer for execution, but upon completion the output of the script will be returned back to BatchPatch for viewing.

    -Doug

    #11548
    rherrera
    Participant

    That would be a great addition. Will this support PowerShell scripts as well? Or would we just have to create a batch script that calls PowerShell?

    #11549
    doug
    Moderator

    Yes, it will support PowerShell scripts too. We expect it will be published probably within the next 6 weeks.

    Thanks,

    Doug

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.