.ps1 is not digitally signed. The script will not execute on the system.
When you try running PowerShell script on secure servers or workstations you may be stopped by the message “.ps1 is not digitally signed. The script will not execute on the system. Please see “get-help about_signing” for more details..”
You can multiple options to sign the PowerShell script that you want to run, change the execution policy, bypass the policyonce so that it can run once on that session.
To permanentlychange the Execution Policy on a machine:
Set-ExecutionPolicy -ExecutionPolicy unrestricted
To Bypass the Policy once in the PowerShell session:
Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass
The above command sets the execution policy to bypass for the current PowerShell session. You need not to worry as once the current Powershell window will be closed, the next PowerShell session will open with the default execution policy. “Bypass” clears the blocked scripts with no warnings, prompts to be displayed.
Now try re-running the .ps1 Script and it must run successfully.
Thanks a ton for reading my above blog. If you have any comments, suggestions, or feedback please spare a second to post it.