Executing IIS (PowerShell) script using Invoke PowerShell activity has below error " Files cannot be loaded because running scripts is disabled on this system. Provide a valid certificate with which to sign the files" .
Root Cause: Restrictions of the execution policies.
Resolution: Proceed as follows,
- Open Powershell as an administrator
- Run the following commands:
- Set-Executionpolicy Unrestricted (Remove restrictions so that all Windows PowerShell scripts can be run)
- Set-ExecutionPolicy RemoteSigned (Downloaded scripts must be signed by a trusted publisher before they can be run)
More information here: Setting PowerShell Execution Policies
If it is not possible to change the restrictions at machine level, try at user level:
- Set-ExecutionPolicy RemoteSigned -Scope CurrentUser