{"id":136,"date":"2016-01-28T09:18:27","date_gmt":"2016-01-28T09:18:27","guid":{"rendered":"http:\/\/robinplomp.com\/?p=136"},"modified":"2016-01-28T09:18:27","modified_gmt":"2016-01-28T09:18:27","slug":"starting-powershell-as-default-within-windows-core","status":"publish","type":"post","link":"https:\/\/robinplomp.com\/?p=136","title":{"rendered":"Starting PowerShell as default within Windows Core"},"content":{"rendered":"<p>My lab environment runs on Windows 2012 R2 Core, with Hyper-V installed. It runs smoothly. When I need to manage the environment I can do the most common task right there on the prompt. <\/p>\n<p>But with Microsoft pushing everyone to use PowerShell I don\u2019t understand why Windows Core start with a normal prompt instead of a PowerShell prompt. <\/p>\n<p>In this article I will describe how you can change the prompt that is launched when Windows Core boots from CMD to PowerShell. <\/p>\n<p>In Windows Core there is no explore. All you get to see is al black command box.. <\/p>\n<p><a href=\"http:\/\/i0.wp.com\/www.peppercrew.nl\/wp-content\/uploads\/2014\/08\/Schermafdruk2014081120.53.59.png\"><img loading=\"lazy\" decoding=\"async\" title=\"Schermafdruk 2014-08-11 20.53.59\" border=\"0\" alt=\"Schermafdruk 2014-08-11 20.53.59\" src=\"http:\/\/i2.wp.com\/www.peppercrew.nl\/wp-content\/uploads\/2014\/08\/Schermafdruk2014081120.53.59_thumb.png?resize=312%2C184\" width=\"312\" height=\"184\"><\/a> <\/p>\n<p>Now let\u2019s see if we can find out how to change the cmd prompt to a PowerShell prompt.<br \/>First I need to know what\u2019s the current value for the shell that is launched at startup.<\/p>\n<p><!--more--><\/p>\n<p><a href=\"http:\/\/i0.wp.com\/www.peppercrew.nl\/wp-content\/uploads\/2014\/08\/Schermafdruk2014081121.02.09.png\"><img loading=\"lazy\" decoding=\"async\" title=\"Schermafdruk 2014-08-11 21.02.09\" border=\"0\" alt=\"Schermafdruk 2014-08-11 21.02.09\" src=\"http:\/\/i0.wp.com\/www.peppercrew.nl\/wp-content\/uploads\/2014\/08\/Schermafdruk2014081121.02.09_thumb.png?resize=329%2C171\" width=\"329\" height=\"171\"><\/a>Surprisingly the shell for Windows Server 2012 R2 Core is explore.exe. But as I searched a bit further I found that this version of Windows is using a value for AlternativeShells. And there we find the reference to cmd.exe <\/p>\n<p><a href=\"http:\/\/i2.wp.com\/www.peppercrew.nl\/wp-content\/uploads\/2014\/08\/Schermafdruk2014081121.16.05.png\"><img loading=\"lazy\" decoding=\"async\" title=\"Schermafdruk 2014-08-11 21.16.05\" border=\"0\" alt=\"Schermafdruk 2014-08-11 21.16.05\" src=\"http:\/\/i0.wp.com\/www.peppercrew.nl\/wp-content\/uploads\/2014\/08\/Schermafdruk2014081121.16.05_thumb.png?resize=327%2C168\" width=\"327\" height=\"168\"><\/a>The value for alternate shell 3000 can\u2019t be edited but I did found a different way the accomplish my goal. <\/p>\n<p>With the following code I\u2019ve changed the value for the Shell property. <a href=\"http:\/\/i2.wp.com\/www.peppercrew.nl\/wp-content\/uploads\/2014\/08\/Schermafdruk2014081121.27.511.png\"><img loading=\"lazy\" decoding=\"async\" title=\"Schermafdruk 2014-08-11 21.27.51\" border=\"0\" alt=\"Schermafdruk 2014-08-11 21.27.51\" src=\"http:\/\/i2.wp.com\/www.peppercrew.nl\/wp-content\/uploads\/2014\/08\/Schermafdruk2014081121.27.51_thumb.png?resize=327%2C167\" width=\"327\" height=\"167\"><\/a> <\/p>\n<p>Now lets reboot to see if we now have a PowerShell prompt.. <\/p>\n<p><a href=\"http:\/\/i0.wp.com\/www.peppercrew.nl\/wp-content\/uploads\/2014\/08\/Schermafdruk2014081121.40.51.png\"><img loading=\"lazy\" decoding=\"async\" title=\"Schermafdruk 2014-08-11 21.40.51\" border=\"0\" alt=\"Schermafdruk 2014-08-11 21.40.51\" src=\"http:\/\/i0.wp.com\/www.peppercrew.nl\/wp-content\/uploads\/2014\/08\/Schermafdruk2014081121.40.51_thumb.png?resize=368%2C216\" width=\"368\" height=\"216\"><\/a> <\/p>\n<p>The big question remains, why is this not the default.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>My lab environment runs on Windows 2012 R2 Core, with Hyper-V installed. It runs smoothly. When I need to manage the environment I can do the most common task right there on the prompt. But with Microsoft pushing everyone to use PowerShell I don\u2019t understand why Windows Core start with a normal prompt instead of &hellip; <a href=\"https:\/\/robinplomp.com\/?p=136\" class=\"more-link\">Lees verder <span class=\"screen-reader-text\">Starting PowerShell as default within Windows Core<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[14,21],"tags":[],"class_list":["post-136","post","type-post","status-publish","format-standard","hentry","category-powershell","category-windows"],"_links":{"self":[{"href":"https:\/\/robinplomp.com\/index.php?rest_route=\/wp\/v2\/posts\/136","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/robinplomp.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/robinplomp.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/robinplomp.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/robinplomp.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=136"}],"version-history":[{"count":1,"href":"https:\/\/robinplomp.com\/index.php?rest_route=\/wp\/v2\/posts\/136\/revisions"}],"predecessor-version":[{"id":137,"href":"https:\/\/robinplomp.com\/index.php?rest_route=\/wp\/v2\/posts\/136\/revisions\/137"}],"wp:attachment":[{"href":"https:\/\/robinplomp.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=136"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/robinplomp.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=136"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/robinplomp.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=136"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}