Posted Wed, 26 Aug 2015 12:25:07 GMT by Portal Admin

To run a powershell job in Skybot the command line would look like this:

powershell.exe -command c:\temp\test.ps1

The powershell.exe and -command needs to precede the script.

Below is a link describing how to schedule a powershell scripts:

http://exchangeshare.wordpress.com/2008/12/08/how-to-schedule-powershell-script-for-an-exchange-task/


Powershell send a 0 exit code no matter what. Here is a command to add to the script to get it to send a 1 for a failure:  $script:ErrorActionPreference='Stop'

 

I added this line to my ps script and it passes a 1 when it fails:

devtest.ps1

$script:ErrorActionPreference='Stop'

Rubbish

 

Found the information here:

http://octopusdeploy.com/blog/powershell-exit-codes

You must be signed in to post in this forum.