{"id":74701,"date":"2015-11-21T00:01:00","date_gmt":"2015-11-21T00:01:00","guid":{"rendered":"https:\/\/blogs.technet.microsoft.com\/heyscriptingguy\/2015\/11\/21\/weekend-scripter-the-case-of-the-disappearing-powershell-console\/"},"modified":"2019-02-18T09:34:27","modified_gmt":"2019-02-18T16:34:27","slug":"weekend-scripter-the-case-of-the-disappearing-powershell-console","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/scripting\/weekend-scripter-the-case-of-the-disappearing-powershell-console\/","title":{"rendered":"Weekend Scripter: The Case of the Disappearing PowerShell Console"},"content":{"rendered":"<p><b style=\"font-size:12px\">Summary<\/b><span style=\"font-size:12px\">: Ed Wilson, Microsoft Scripting Guy, talks about fixing a problem where his Windows PowerShell console disappears.<\/span><\/p>\n<p>Microsoft Scripting Guy, Ed Wilson, is here. So there I was, on a two week trip, out of time, with only my laptop, and I needed to use Windows PowerShell. Most of the time, I use the Windows PowerShell console, but I do occasionally use the Windows PowerShell ISE. At home, I have a nice-sized second monitor that is attached to my laptop&mdash;but I do not&mdash;actually the truth is, I rarely travel with my second monitor. I have been known to take it with me on a road trip.<\/p>\n<p>So I click to open the Windows PowerShell console and&hellip;nothing. Hmm, I try it again. This time I noticed that the Windows PowerShell console had in fact opened&mdash;it was just missing. As shown here, I noticed a white underline beneath the Windows PowerShell console icon I have on my tool bar in Windows&nbsp;10.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/hsg-11-21-15-01.png\"><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/hsg-11-21-15-01.png\" alt=\"Image of tool bar\" title=\"Image of tool bar\" \/><\/a><\/p>\n<p>I pressed <b>CTRL<\/b> + <b>Shift<\/b> + <b>Esc<\/b> to bring up Task Manager. I saw that Windows PowerShell was in fact running, but I could not see it:<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/hsg-11-21-15-02.png\"><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/hsg-11-21-15-02.png\" alt=\"Image of menu\" title=\"Image of menu\" \/><\/a><\/p>\n<p>I ended my Windows PowerShell session, closed the Task Manager, and tried again. I confirmed that Windows PowerShell was loading, but it was not visible. Bummer.<\/p>\n<h2>Finding a visible Windows PowerShell console<\/h2>\n<p>Then I had an idea&hellip;<\/p>\n<p>I can use the Windows PowerShell ISE, but I still wanted the Windows PowerShell console. Guess what? There is an icon for the Windows PowerShell console in the tool bar of the Windows PowerShell ISE. I clicked that, and it worked. The icon is shown here:<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/hsg-11-21-15-03.png\"><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/hsg-11-21-15-03.png\" alt=\"Image of menu\" title=\"Image of menu\" \/><\/a><\/p>\n<p>And that is what I did for two weeks. I clicked the little Windows PowerShell icon on the Windows PowerShell ISE tool bar, and then I had an instance of the Windows PowerShell console I could use. It was not too bad because I often have both the ISE and the console open anyway, but I used to always open the console first&mdash;so this was a learning opportunity.<\/p>\n<p>One day, I searched through the registry hoping I could find something that was storing the screen location (usually in pixels in the x and y coordinates). I was hoping to see how it&rsquo;s opening window position was set, but alas, I did not find it. It might be there, but I could not find it in the 15 minutes I devoted to the task.<\/p>\n<h2>Fixing the problem<\/h2>\n<p>Eventually I decided to email our internal Windows PowerShell discussion group to see if anyone else had experienced this problem, and if anyone had come up with a solution. After I sent the email, I quickly saw several people replying with <b>+1<\/b>, which in Microsoft email speak means that they are also having the same problem. Within 15 minutes, someone from our support group replied that I should look at the properties of my Windows PowerShell console window. Remember, that I can get to one via the Windows PowerShell ISE icon.<\/p>\n<p>To find the Windows PowerShell console properties, I click the Windows PowerShell icon in the upper left corner of the Windows PowerShell console window, and then I select <b>Properties<\/b> from the action menu:<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/hsg-11-21-15-04.png\"><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/hsg-11-21-15-04.png\" alt=\"Image of menu\" title=\"Image of menu\" \/><\/a><\/p>\n<p>I select the <b>Let System position Window<\/b> check box on the <b>Layout<\/b> tab:<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/hsg-11-21-15-05.png\"><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/hsg-11-21-15-05.png\" alt=\"Image of menu\" title=\"Image of menu\" \/><\/a><\/p>\n<p>He also told me something else that I didn&rsquo;t know: If the Windows PowerShell console opens off screen, I can click the Windows PowerShell icon on the tool bar to get focus. Then I can press <b>Alt<\/b> + <b>Spacebar<\/b> to open the context menu, and press <b>M<\/b> to enable me to move the Windows PowerShell console via the arrow keys. Cool.<\/p>\n<p>I invite you to follow me on <a href=\"http:\/\/bit.ly\/scriptingguystwitter\" target=\"_blank\">Twitter<\/a> and <a href=\"http:\/\/bit.ly\/scriptingguysfacebook\" target=\"_blank\">Facebook<\/a>. If you have any questions, send email to me at <a href=\"mailto:scripter@microsoft.com\" target=\"_blank\">scripter@microsoft.com<\/a>, or post your questions on the <a href=\"http:\/\/bit.ly\/scriptingforum\" target=\"_blank\">Official Scripting Guys Forum<\/a>. See you tomorrow. Until then, peace.<\/p>\n<p><b>Ed Wilson, Microsoft Scripting Guy<\/b><span style=\"font-size:12px\">&nbsp;<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Summary: Ed Wilson, Microsoft Scripting Guy, talks about fixing a problem where his Windows PowerShell console disappears. Microsoft Scripting Guy, Ed Wilson, is here. So there I was, on a two week trip, out of time, with only my laptop, and I needed to use Windows PowerShell. Most of the time, I use the Windows [&hellip;]<\/p>\n","protected":false},"author":596,"featured_media":87096,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[648,3,134,61,608,45,647],"class_list":["post-74701","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-scripting","tag-console","tag-scripting-guy","tag-troubleshooting","tag-weekend-scripter","tag-windows-10","tag-windows-powershell","tag-windows-powershell-5-0"],"acf":[],"blog_post_summary":"<p>Summary: Ed Wilson, Microsoft Scripting Guy, talks about fixing a problem where his Windows PowerShell console disappears. Microsoft Scripting Guy, Ed Wilson, is here. So there I was, on a two week trip, out of time, with only my laptop, and I needed to use Windows PowerShell. Most of the time, I use the Windows [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/posts\/74701","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/users\/596"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/comments?post=74701"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/posts\/74701\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/media\/87096"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/media?parent=74701"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/categories?post=74701"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/tags?post=74701"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}