{"id":671,"date":"2012-02-27T22:21:53","date_gmt":"2012-02-27T11:21:53","guid":{"rendered":"http:\/\/ntsblog.homedev.com.au\/?p=671"},"modified":"2012-04-03T00:02:26","modified_gmt":"2012-04-02T14:02:26","slug":"set-powershell-executionpolicy","status":"publish","type":"post","link":"https:\/\/ntsblog.homedev.com.au\/index.php\/2012\/02\/27\/set-powershell-executionpolicy\/","title":{"rendered":"Set PowerShell ExecutionPolicy"},"content":{"rendered":"<div id=\"ntsbl-2229186043\" class=\"ntsbl-before-content ntsbl-entity-placement\"><script async src=\"\/\/pagead2.googlesyndication.com\/pagead\/js\/adsbygoogle.js?client=ca-pub-6288941070289539\" crossorigin=\"anonymous\"><\/script><ins class=\"adsbygoogle\" style=\"display:inline-block;width:728px;height:90px;\" \ndata-ad-client=\"ca-pub-6288941070289539\" \ndata-ad-slot=\"9356781486\"><\/ins> \n<script> \n(adsbygoogle = window.adsbygoogle || []).push({}); \n<\/script>\n<\/div><p>When trying to run a PowerShell script you may get the following error:<\/p>\n<p>&#8220;scriptname.ps1 cannot be loaded because the execution of scripts is disabled on this system&#8221;<\/p>\n<p>You need to do the following to set the executionPolicy.<\/p>\n<p>1. Run Powershell as Administrator<br \/>\n2. get-exeuctionPolicy<br \/>\n3. set-executionPolicy RemoteSigned<br \/>\n4. Enter Y<br \/>\n5. Check by running get-exeuctionPolicy<br \/>\n&nbsp;<\/br><br \/>\n&nbsp;<\/br><br \/>\n<a href=\"https:\/\/ntsblog.homedev.com.au\/wp-content\/uploads\/2012\/02\/PowerShellRemoteSigned.png\"><img loading=\"lazy\" decoding=\"async\" data-attachment-id=\"673\" data-permalink=\"https:\/\/ntsblog.homedev.com.au\/index.php\/2012\/02\/27\/set-powershell-executionpolicy\/powershellremotesigned\/\" data-orig-file=\"https:\/\/ntsblog.homedev.com.au\/wp-content\/uploads\/2012\/02\/PowerShellRemoteSigned.png\" data-orig-size=\"524,294\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}\" data-image-title=\"PowerShellRemoteSigned\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/ntsblog.homedev.com.au\/wp-content\/uploads\/2012\/02\/PowerShellRemoteSigned-300x168.png\" data-large-file=\"https:\/\/ntsblog.homedev.com.au\/wp-content\/uploads\/2012\/02\/PowerShellRemoteSigned.png\" src=\"https:\/\/ntsblog.homedev.com.au\/wp-content\/uploads\/2012\/02\/PowerShellRemoteSigned.png\" alt=\"\" title=\"PowerShellRemoteSigned\" width=\"524\" height=\"294\" class=\"aligncenter size-full wp-image-673\" srcset=\"https:\/\/ntsblog.homedev.com.au\/wp-content\/uploads\/2012\/02\/PowerShellRemoteSigned.png 524w, https:\/\/ntsblog.homedev.com.au\/wp-content\/uploads\/2012\/02\/PowerShellRemoteSigned-300x168.png 300w\" sizes=\"auto, (max-width: 524px) 100vw, 524px\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>When trying to run a PowerShell script you may get the following error: &#8220;scriptname.ps1 cannot be loaded because the execution of scripts is disabled on [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[6],"tags":[],"class_list":["post-671","post","type-post","status-publish","format-standard","hentry","category-code"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/ntsblog.homedev.com.au\/index.php\/wp-json\/wp\/v2\/posts\/671","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ntsblog.homedev.com.au\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ntsblog.homedev.com.au\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ntsblog.homedev.com.au\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/ntsblog.homedev.com.au\/index.php\/wp-json\/wp\/v2\/comments?post=671"}],"version-history":[{"count":0,"href":"https:\/\/ntsblog.homedev.com.au\/index.php\/wp-json\/wp\/v2\/posts\/671\/revisions"}],"wp:attachment":[{"href":"https:\/\/ntsblog.homedev.com.au\/index.php\/wp-json\/wp\/v2\/media?parent=671"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ntsblog.homedev.com.au\/index.php\/wp-json\/wp\/v2\/categories?post=671"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ntsblog.homedev.com.au\/index.php\/wp-json\/wp\/v2\/tags?post=671"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}