How to Enable PowerShell Script on Windows

How to Enable PowerShell Script on Windows


In this tutorial, we will see How to Enable PowerShell Script on Windows. By Default Powershell Script is disabled in windows. Don’t worry we can fix it in an easy way.

PowerShell or Microsoft PowerShell is a task automation and configuration management program from Microsoft, consisting of a command-line shell and the associated scripting language.

From 2006 to 2016, PowerShell was only available on Windows, named Windows PowerShell up to version 5.1. PowerShell was built on top of the .NET Framework, which was only available in Windows. In 2016, Microsoft decided to make a bold move and open-source PowerShell on GitHub, where it dropped the ‘Windows’ and went to just ‘PowerShell’ in version six.

Since then, PowerShell has been available not just on Windows but on macOS, Linux, and other *nix operating systems where it uses .NET Core.

How to Enable PowerShell Script on Windows

if Powershell Script is disable and you want to run any script then you will see some errors like this:

Cannot be loaded because the execution of scripts is disabled on this system. Please see “get-help about-signing”.

So let’s go to fix it

first, let’s check whether Powershell Script is disable by the system or not.

Error Check :

  1. Press Windows+R to open the Run dialog box.
  2. Now type “PowerShell” in the text box and hit Enter.
  3. It will Open PowerShell Console.
  4. Now type “Get-Executionpolicy” and hit Enter.

Solution :

  1. Now just type set-executionpolicy remotesigned and hit Enter.
  2. That will tell PowerShell to allow local (that is, on a local drive) unsigned scripts to run.
  3. Then try executing your script again. it will fix your issue.
Tags: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,

Leave a Reply

Your email address will not be published.