[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

 19,081 total views,  26 views today

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 for 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:

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

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