{"id":12855,"date":"2018-09-19T02:58:55","date_gmt":"2018-09-19T02:58:55","guid":{"rendered":"https:\/\/www.top-password.com\/blog\/?p=12855"},"modified":"2018-09-19T03:03:02","modified_gmt":"2018-09-19T03:03:02","slug":"change-powershell-execution-policy-in-windows-10","status":"publish","type":"post","link":"https:\/\/www.top-password.com\/blog\/change-powershell-execution-policy-in-windows-10\/","title":{"rendered":"3 Ways to Change PowerShell Execution Policy in Windows 10"},"content":{"rendered":"<p>PowerShell script cannot be loaded because the execution of scripts is disabled on this system? By default, Windows restricts running PowerShell scripts, as a security mechanism. To verify the PowerShell execution policy on your computer, you can use the <strong>Get-ExecutionPolicy<\/strong> cmdlet.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.top-password.com\/blog\/wp-content\/uploads\/2018\/09\/Get-ExecutionPolicy.png\" alt=\"\" width=\"477\" height=\"131\" class=\"alignnone size-full wp-image-12862\" \/><\/p>\n<p>If the execution policy is displayed as Restricted, you can change it to other settings as shown below.<\/p>\n<ul>\n<li><strong>Restricted<\/strong> \u2013 No scripts can be run. Windows PowerShell can be used only in interactive mode.<\/li>\n<li><strong>AllSigned<\/strong> \u2013 Only scripts signed by a trusted publisher can be run.<\/li>\n<li><strong>RemoteSigned<\/strong> \u2013 Downloaded scripts must be signed by a trusted publisher before they can be run.<\/li>\n<li><strong>Unrestricted<\/strong> \u2013 No restrictions. All PowerShell scripts can be run.<\/li>\n<\/ul>\n<p>In this tutorial we&#8217;ll show you how to change PowerShell execution policy in Windows 10 using command line, group policy or registry tweak.<\/p>\n<p><strong>Method 1: Change PowerShell Execution Policy with Command Line<\/strong><\/p>\n<p><a href=\"https:\/\/www.top-password.com\/blog\/5-ways-to-run-powershell-as-administrator-in-windows-10\/\" rel=\"noopener\" target=\"_blank\">Open the PowerShell as administrator<\/a>. You can use the <strong>Set-ExecutionPolicy<\/strong> command to set the PowerShell execution policy as per your requirement.<\/p>\n<p><code>Set-ExecutionPolicy Unrestricted<\/code><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.top-password.com\/blog\/wp-content\/uploads\/2018\/09\/Set-ExecutionPolicy.png\" alt=\"\" width=\"596\" height=\"235\" class=\"alignnone size-full wp-image-12863\" \/><\/p>\n<p><strong>Method 2: Change PowerShell Execution Policy with Group Policy<\/strong><\/p>\n<p><a href=\"https:\/\/www.top-password.com\/blog\/open-local-group-policy-editor-in-windows-10\/\" rel=\"noopener\" target=\"_blank\">Open the Local Group Policy Editor<\/a> and navigate to <em>Computer Configuration<\/em> -&gt; <em>Administrative Templates<\/em> -&gt; <em>Windows Components<\/em> -&gt; <em>Windows PowerShell<\/em>. Double-click a setting called &#8220;<strong>Turn on Script Execution<\/strong>&#8221; on the right pane.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.top-password.com\/blog\/wp-content\/uploads\/2018\/09\/turn-on-powershell-script-execution.png\" alt=\"\" width=\"591\" height=\"295\" class=\"alignnone size-full wp-image-12864\" \/><\/p>\n<p>Select the <strong>Enabled<\/strong> option. Beneath it, you can click the drop-down list to set the execution policy to &#8220;<strong>Allow all scripts<\/strong>&#8220;. Click <strong>OK<\/strong> to save your changes.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.top-password.com\/blog\/wp-content\/uploads\/2018\/09\/change-powershell-execution-policy.png\" alt=\"\" width=\"596\" height=\"449\" class=\"alignnone size-full wp-image-12865\" \/><\/p>\n<p><strong>Method 3: Change PowerShell Execution Policy with Registry Editor<\/strong><\/p>\n<p><a href=\"https:\/\/www.top-password.com\/blog\/6-ways-to-open-registry-editor-in-windows-10\/\" rel=\"noopener\" target=\"_blank\">Open Registry Editor<\/a> and browse to the following registry key by copying and pasting it in the address bar and pressing Enter. Next, double-click the string <strong>ExecutionPolicy<\/strong> on the right pane.<\/p>\n<p><code>HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\PowerShell\\1\\ShellIds\\Microsoft.PowerShell<\/code><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.top-password.com\/blog\/wp-content\/uploads\/2018\/09\/ExecutionPolicy.png\" alt=\"\" width=\"585\" height=\"293\" class=\"alignnone size-full wp-image-12866\" \/><\/p>\n<p>Set the value data to one of the following values: <em>Restricted<\/em>, <em>AllSigned<\/em>, <em>RemoteSigned<\/em>, <em>Unrestricted<\/em>, <em>Undefined<\/em>. Click <strong>OK<\/strong> and then close Registry Editor.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.top-password.com\/blog\/wp-content\/uploads\/2018\/09\/unrestricted.png\" alt=\"\" width=\"382\" height=\"170\" class=\"alignnone size-full wp-image-12867\" \/><\/p>\n<p>That&#8217;s it!<\/p>\n<!-- AddThis Advanced Settings generic via filter on the_content --><!-- AddThis Share Buttons generic via filter on the_content -->","protected":false},"excerpt":{"rendered":"<p>PowerShell script cannot be loaded because the execution of scripts is disabled on this system? By default, Windows restricts running PowerShell scripts, as a security mechanism. To verify the PowerShell execution policy on your computer, you can use the Get-ExecutionPolicy cmdlet. If the execution policy is displayed as Restricted, you can change it to other [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1,10,1894],"tags":[3973,3974],"class_list":["post-12855","post","type-post","status-publish","format-standard","hentry","category-others","category-tips-tricks","category-windows-10","tag-change-powershell-execution-policy","tag-windows-10-powershell-execution-policy"],"_links":{"self":[{"href":"https:\/\/www.top-password.com\/blog\/wp-json\/wp\/v2\/posts\/12855","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.top-password.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.top-password.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.top-password.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.top-password.com\/blog\/wp-json\/wp\/v2\/comments?post=12855"}],"version-history":[{"count":12,"href":"https:\/\/www.top-password.com\/blog\/wp-json\/wp\/v2\/posts\/12855\/revisions"}],"predecessor-version":[{"id":12873,"href":"https:\/\/www.top-password.com\/blog\/wp-json\/wp\/v2\/posts\/12855\/revisions\/12873"}],"wp:attachment":[{"href":"https:\/\/www.top-password.com\/blog\/wp-json\/wp\/v2\/media?parent=12855"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.top-password.com\/blog\/wp-json\/wp\/v2\/categories?post=12855"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.top-password.com\/blog\/wp-json\/wp\/v2\/tags?post=12855"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}