[Fixed] - Script is not digitally signed. You cannot run this script on the current system

[Fixed]: Script is not digitally signed. You cannot run this script on the current system

No comments

Loading

The script is not digitally signed is a common error in PowerShell coding. Many times, we might face this issue like when we try to execute the PowerShell script (.ps1) file on our laptop or desktop we will get this error “<script path>.ps1 is not
digitally signed. You cannot run this script on the current system. For more information about running scripts and setting execution policy, see about_Execution_Policies at https:/go.microsoft.com/fwlink/?LinkID=135170.”

How to fix the script “is not digitally signed. You cannot run this script on the current system” issue?

In order to fix this issue, we need to execute the below command and change the execution policy setting before running the main script or we can add the below line at the begging of the .ps1 file from the PowerShell editor (Windows PowerShell ISE).


Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass

Description: What exactly will do the above command?

  • The above command sets the execution policy to bypass only the current user PowerShell session.
  • After executing the script, once the window is closed, the next PowerShell session will open running with the default execution policy – hence we see that this is not a permanent change in the policy, so no worry. 🙂
  • The “Bypass” parameter means nothing is blocked and no warnings, prompts, or messages will be displayed, the script will continue to execute without any interruption (warning, message, etc).

Summary: Script is not digitally signed

Thus, in this troubleshooting article, we have learned about how to fix the error “<script path>.ps1 is not digitally signed. You cannot run this script on the current system. For more information about running scripts and setting execution policy, see about_Execution_Policies at https:/go.microsoft.com/fwlink/?LinkID=135170.”

See Also: SharePoint PowerShell

You may also look into the below SharePoint search troubleshooting articles:

Buy the premium version of SharePoint Online & Office 365 administration eBook from here:

Buy SharePoint Online & Office 365 Administration eBook

About Post Author

Do you have a better solution or question on this topic? Please leave a comment