How to enable PowerShell scripting on Windows 10

How to enable PowerShell scripting on Windows 10


 Today we are going to take a look at how to enable PowerShell scripting in Windows 10.


Enable PowerShell Scripting in Group Policy

This method works in Windows 10 Pro, Enterprise or Education, if you have a dozen home versions - go to the second method.


1.  Open  group policies : in the search bar or in the run menu (run by pressing Win + R), type  gpedit.msc  and press Enter.


2. Go to "Computer Configuration" => "Administrative Templates" => "Windows Components" => "Windows PowerShell" => open the "Enable Scripting" option.


3. Put a full stop in the "Enabled" field, in the "Execution Policy" line, select the one you need and click on "OK":


  • only allow signed scripts;
  • allow local scripts and remote signed scripts;
  • allow all scripts.

Enable PowerShell Scripting in Registry Editor

1.  Type regedit  in the search bar or on the Run menu (Win + R)  and press Enter.

2. Go to the path  HKEY_LOCAL_MACHINE \ SOFTWARE \ Policies \ Microsoft \ Windows,  right-click on the Windows section, select "New" => "Section" => name the new section PowerShell.

3. Right-click the PowerShell section, select New => DWORD Parameter (32 bit) => name the new parameter  EnableScripts.

4. Open the EnableScripts parameter in the "Value" field, enter  1 and click on "OK".

4. Open the EnableScripts parameter in the "Value" field, enter  1 and click on "OK".

5. Right-click the PowerShell section, select New => String Parameter => name the new parameter ExecutionPolicy.

6. Open the ExecutionPolicy parameter in the Value field, enter the desired value:

  • AllSigned  to only allow signed scripts;
  • RemoteSigned  allow local scripts and remote signed scripts;
  • Unrestricted to allow all scripts.

When you enter the desired value, click on "OK" and close the registry editor. That's all for today, if you know other ways - write in the comments! Good luck 

Post a Comment

0 Comments

close