4 Replies Latest reply on Oct 13, 2012 12:50 PM by Lazar NameToUpdate

    Error when using the nsh script option execute script once

    Bernard Eilers



      I'm rather new to BSA and NSH scripting, but trying to run a powershell script on the BSA server which should only run once using the different hostnames as a parameter. BSA version is


      So I choose the Script option:

      Execute the script once, passing the host list as a parameter to the script (NOTE: "%h" or "%f" macros are available.)


      I created a parameter called host with the value %h


      This is the content of the script to test if the parameters would be parsed:


      for host in ${@}


          nexec -i -e cmd /c "echo ${host} >c:\temp\host.txt"



      This was my original script:

      nexec -i -e cmd /c "echo . | powershell d:\\db_scripts\\querynetvar.ps1 ${@}"


      I remain getting the errors:

      Script parameterization can only be used for host based or copy/nexec execution


      The Job has failed.


      Anyone an idea, it seems to be a very basic mistake.