Delivering a package to run a Powershell script. The delivery stops asking for permission to run the script showing a Security Warning:
Run only scripts that you trust. While scripts from the Internet can be useful, this script can potentially harm your computer.
Do you want to run Z:\activate\B0E40622-CA09-444C-A51D-2C148E0F2214.itm\1.vol\myscript.ps1?
[D] Do not run [R] Run once [S] Suspend [?] Help (default is "D"):
Client Automation - All Versions.
When the Software Delivery agent is configured to run procedures from the Software Library share (Internal NOS download method), the script is stored on the mapped drive (in this example Z:). Powershell does not allow the execution of the script from the mapped drive and the security warning is displayed.
Modify the procedure script to copy the Powershell script from the package to a local directory like %Temp% and execute it. Example:
copy .\myscript.ps1 %Temp%