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

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.

Share:

Leave a Reply

You May Also Like

Are you looking at importing DscResource with Relative Paths when working in PowerShell? If so, let’s have a look at...
There are many ways in which you can run your PowerShell Script. In this post , we will how to...
If you are new to PowerShell and wondering how to add comments with-in your Powershell code , here’s how you...