PowerShell – The file is not digitally signed. You cannot run this script on the current system.

In this post, let’s learn about the Powershell error “The file <Filename> is not digitally signed. You cannot run this script on the current system.” and how to fix it on your Windows PC.

Powershell Error Message

The file <Filename> 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.

When you run a PowerShell script that has not been signed by a trusted publisher on your Windows PC, you may get the following security error:

The file <Filename> 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.

This is one of the security errors that occurs when the PowerShell’s execution policy is set to be Allsigned or Remotesigned.

How to fix this PowerShell Error?

You can fix this error by running the below command.

Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass

This will set the execution policy to bypass for the current PowerShell session. The parameter “Bypass” means the code will not be blocked from running and no warnings or messages will be returned.