1 Reply Latest reply on Jun 23, 2014 7:01 PM by Bill Robinson

    NSH question about addExternalCmdToEnd

      I'm trying to programatically create a BL package with NSH.  This is a basic package that contains a war file and a Powershell script with an external command to execute the Powershell script.

       

      I can create the package with the two files without a problem, however adding an external command to the BL package seems to be a little more challenging.

       

      This is what I want my external command to be:

      powershell.exe -noninteractive -command "& c:\tmp\MassCodeDeploy.ps1"

       

      I'm running my NSH script directly against my BSA app server running on Linux.

       

      I have used variants of what I found in the documentation.  I have fully pathed the powershell executable, I have hard coded a remove server name, tried single quotes, etc.

       

       

      blcli_execute BlPackage addExternalCmdToEnd $PACKAGE_DBKEY sampleExternalCmd /c/temp/cmd.txt /c/temp/undocmd.txt "Abort"

       

      blcli_execute BlPackage addExternalCmdToEnd $PACKAGE_DBKEY sampleExternalCmd //myRemoteServer/c/temp/cmd.txt //myRemoteServer/c/temp/undocmd.txt "Abort"`