Skip to content

TechDirectArchive

Hands-on IT, Cloud, Security & DevOps Insights

  • Home
  • About
  • Advertise With US
  • Reviews
  • Contact
  • Toggle search form
Home » Windows Server » How to set the PowerShell Execution Policy via Windows Registry
  • Actualidad 211741393 129861581 1050x760
    Edge GPO settings: All Group Policies available to configure Microsoft Edge Settings Windows Server
  • Cluster 1
    Quarantine state in Windows Failover Clusters: How to resolve quarantined Cluster Node on Hyper-V Virtualization
  • IIS Installed
    Add and remove IIS Web Server on Windows Server 2019 via the Server Manager and PowerShell Web Server
  • How to Migrate Windows Servers from Hyper V to Proxmox Correctly
    Migrate Windows Servers from Hyper V to Proxmox Correctly Backup
  • Synergy software kvm
    Why Software KVMs such as Synergy is replacing Hardware KVMs Linux
  • Convert PEM to PPK 1
    Convert a PEM Key to a PPK Key on a Linux and Windows AWS/Azure/OpenShift
  • google sdk feature
    How To Install Google Cloud SDK on a Linux System Linux
  • Docker Guide
    Pull and Deploy Nginx Container Images from Docker Hub AWS/Azure/OpenShift

How to set the PowerShell Execution Policy via Windows Registry

Posted on 04/02/202028/12/2023 Christian By Christian No Comments on How to set the PowerShell Execution Policy via Windows Registry
PowerShell

In this article, we will discuss “How to set the PowerShell Execution Policy via Windows Registry”. PowerShell is a cross-platform task automation and configuration management framework, consisting of a command-line shell and scripting language. Please see Determine the execution policy configured on Windows PC, and How to install and update PowerShell version 7 on Windows and Linux.

Unlike most shells, which accept and return text, PowerShell is built on top of the .NET Common Language Runtime (CLR), and accepts and returns. NET objects. PowerShell is configured to prevent the execution of PowerShell scripts on Windows systems by default.

To run commands, one of the following systems must be taken into consideration.

HKEY_CURRENT_USER\SOFTWARE\Microsoft\PowerShell\1\ShellIds\Microsoft.PowerShell 

Set the string value ExecutionPolicy to one of the following values:

  • Restricted
  • AllSigned
  • RemoteSigned
  • Unrestricted and
  • Undefined. 

To change the execution policy for the LocalMachine scope, Navigate to the path as shown below.

Execution Policy

Currently, no value is set and none is currently available. To set the string value ExecutionPolicy to one of the following values:

Moreover, Create a new string and enter any ExecutionPolicy value you desire as below. Restricted, AllSigned, RemoteSigned, Unrestricted, Undefined. 

Nonetheless, Create a new string and name it ExecutionPolicy. Now enter the desired value.

Press okay afterwards and that is all. Please see how to Mitigate Windows Print Spooler Remote Code Execution Vulnerability.

FAQs on PowerShell Execution Policy

Is it possible to bypass the PowerShell execution policy for a specific script?

You can bypass the execution policy for a specific script by adding the -ExecutionPolicy Bypass parameter when running the script in the PowerShell command line.

How can I change the PowerShell execution policy on my system?

To change the PowerShell execution policy, open PowerShell as an administrator and use the Set-ExecutionPolicy cmdlet followed by the desired policy, such as RemoteSigned or Unrestricted.

What is the default execution policy in PowerShell, and how can I check it?

The default execution policy is typically set to Restricted. You can check the current execution policy by running the command Get-ExecutionPolicy in a PowerShell window.

Can I make changes to the execution policy permanently, or do they apply only for the current session?

Changes to the execution policy can be made permanently using the Set-ExecutionPolicy cmdlet with the -Scope parameter set to MachinePolicy. This ensures that the policy is applied globally and persists across sessions.

Furthermore, I hope you found this blog post on How to set the PowerShell Execution Policy via Windows Registry helpful. However, please let me know in the comment session if you have any questions.

Rate this post

Thank you for reading this post. Kindly share it with others.

  • Click to share on X (Opens in new window) X
  • Click to share on Reddit (Opens in new window) Reddit
  • Click to share on LinkedIn (Opens in new window) LinkedIn
  • Click to share on Facebook (Opens in new window) Facebook
  • Click to share on Pinterest (Opens in new window) Pinterest
  • Click to share on Tumblr (Opens in new window) Tumblr
  • Click to share on Telegram (Opens in new window) Telegram
  • Click to share on WhatsApp (Opens in new window) WhatsApp
  • Click to share on Pocket (Opens in new window) Pocket
  • Click to share on Mastodon (Opens in new window) Mastodon
  • Click to share on Bluesky (Opens in new window) Bluesky
  • Click to share on Threads (Opens in new window) Threads
  • Click to share on Nextdoor (Opens in new window) Nextdoor
Windows Server Tags:PowerShell, PowerShell version 7, RegistryEditor, Windows 10, Windows Registry

Post navigation

Previous Post: How to set Execution Policy via Windows PowerShell
Next Post: How to set up System Insights on Windows Admin Center

Related Posts

  • ad lds 832x400 1
    Active Directory Lightweight Directory Services [AD LDS] Windows Server
  • Windows 11 taskbar features remove 1
    How to modify Windows 11 Taskbar via Intune and GPO Windows
  • Shared Folder
    How to access shared resources from two different domains Windows
  • fix windows activation 0x87E10BC6 error
    Fix Error 0x87E10BC6 on a PC running Windows non-core Edition Windows
  • Distributed File System DFS
    How to find Dfs Referral Path and clear Dfs referral Cache Storage
  • screenshot 2020 03 13 at 20.24.17
    How to install additional packages via Cygwin Windows Server

More Related Articles

ad lds 832x400 1 Active Directory Lightweight Directory Services [AD LDS] Windows Server
Windows 11 taskbar features remove 1 How to modify Windows 11 Taskbar via Intune and GPO Windows
Shared Folder How to access shared resources from two different domains Windows
fix windows activation 0x87E10BC6 error Fix Error 0x87E10BC6 on a PC running Windows non-core Edition Windows
Distributed File System DFS How to find Dfs Referral Path and clear Dfs referral Cache Storage
screenshot 2020 03 13 at 20.24.17 How to install additional packages via Cygwin Windows Server

Leave a Reply Cancel reply

You must be logged in to post a comment.

Microsoft MVP

VEEAMLEGEND

vexpert-badge-stars-5

Virtual Background

GoogleNews

Categories

veeaam100

sysadmin top30a

  • Actualidad 211741393 129861581 1050x760
    Edge GPO settings: All Group Policies available to configure Microsoft Edge Settings Windows Server
  • Cluster 1
    Quarantine state in Windows Failover Clusters: How to resolve quarantined Cluster Node on Hyper-V Virtualization
  • IIS Installed
    Add and remove IIS Web Server on Windows Server 2019 via the Server Manager and PowerShell Web Server
  • How to Migrate Windows Servers from Hyper V to Proxmox Correctly
    Migrate Windows Servers from Hyper V to Proxmox Correctly Backup
  • Synergy software kvm
    Why Software KVMs such as Synergy is replacing Hardware KVMs Linux
  • Convert PEM to PPK 1
    Convert a PEM Key to a PPK Key on a Linux and Windows AWS/Azure/OpenShift
  • google sdk feature
    How To Install Google Cloud SDK on a Linux System Linux
  • Docker Guide
    Pull and Deploy Nginx Container Images from Docker Hub AWS/Azure/OpenShift

Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 1,839 other subscribers
  • RSS - Posts
  • RSS - Comments
  • About
  • Authors
  • Write for us
  • Advertise with us
  • General Terms and Conditions
  • Privacy policy
  • Feedly
  • Telegram
  • Youtube
  • Facebook
  • Instagram
  • LinkedIn
  • Tumblr
  • Pinterest
  • Twitter
  • mastodon

Tags

AWS Azure Bitlocker Microsoft Windows PowerShell WDS Windows 10 Windows 11 Windows Deployment Services Windows Server 2016

Copyright © 2025 TechDirectArchive

 

Loading Comments...
 

You must be logged in to post a comment.