PowerShell Script is not Digitally Signed you Cannot Run this Script on the Current System

Sometimes if you write the PowerShell script locally and try to run it using the PowerShell command prompt, then most of the time you will get an error: the script is not digitally signed. You cannot run this script on the current system. As shown in the following image.


Why are you getting exception?

Script execution is blocked by default due to the insufficient script execution permission on your machine.

How to resolved the issue?

You have to set the execution policy to unrestricted by using the following PowerShell command.

Set-ExecutionPolicy Unrestricted

Once you press the enter button by typing the command, it will prompt the following warning message as shown in the following image.


Click on the Yes to All button, then it will set the desire execution policy and allows to execute the PowerShell script.

Summary 

I hope you have learned how to resolve the PowerShell script is not digitally signed. You cannot run this script on the Current System exception. If you are facing any issue, then please feel free to ask in the comment box.

Related Article

Post a Comment

www.CodeNirvana.in

Protected by Copyscape
Copyright © Compilemode