2 Replies Latest reply on Mar 13, 2013 7:08 AM by Steffen Kreis

    Powershell Scripts

    David Hawkes

      Excuse my lack of knowledge in Powershell. I have numerous powershell scripts that i use BladeLogic File deploy job to copy to Servers and then Use the post-command to run the scripts e.g


      powershell Set-ExecutionPolicy RemoteSigned

      powershell -command "& { c:\tmp\smt.ps1; exit $lastexitcode }"

      set ret=%errorlevel%

      del c:\tmp\admin.ps1

      powershell Set-ExecutionPolicy Restricted



      BladeLogic copies the PS1 Script to the Server and runs the post command batch job. But the comman to run the script doesn't work and also the connection between BladeLogic and the Server stays open therefore the job in BL doesn't Finsih. I can still see cmd.exe, conhost.exe and powershell.exe running under BladeLogic in Task manager and when i kill these the job Finishes.


      Also if i right click and run the Bat job from the Server it works.


      Any ideas?