Introduction
When you run a .ps1 PowerShell script you might get the message saying “PowerShell is not digitally signed. The script will not execute on the system.”
Fix
To fix it you have to run the command below to run Set-ExecutionPolicy and change the Execution Policy setting.
Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass
Explanation
This command sets the execution policy to bypass for only the current PowerShell session after the window is closed.
The next PowerShell session will open running with the default execution policy.
“Bypass” means nothing is blocked and no warnings, prompts, or messages will be displayed.
Permanent Solution
If you prefer to allow the execution of all the powershell scripts without digit each time the code above, this is a permanent solution:
Set-ExecutionPolicy -ExecutionPolicy unrestricted
