{"id":7112,"date":"2019-12-20T11:21:38","date_gmt":"2019-12-20T16:21:38","guid":{"rendered":"https:\/\/jdhitsolutions.com\/blog\/?p=7112"},"modified":"2019-12-20T11:58:40","modified_gmt":"2019-12-20T16:58:40","slug":"testing-for-powershell-in-windows-terminal","status":"publish","type":"post","link":"https:\/\/jdhitsolutions.com\/blog\/powershell\/7112\/testing-for-powershell-in-windows-terminal\/","title":{"rendered":"Testing for PowerShell in Windows Terminal"},"content":{"rendered":"<p>I have pretty much migrated to Windows Terminal as my primary PowerShell interface. Even though my daily session is PowerShell 7 I love that I can open up other sessions in the same application. yes, I know there are still limitations and that many of you prefer ConEmu. And that's fine. Windows Terminal suits my needs. One of the fun things I'm doing is dressing up the PowerShell 7 tab. I wrote about that <a title=\"read the previous article\" href=\"https:\/\/jdhitsolutions.com\/blog\/powershell\/7003\/friday-fun-getting-ahead-with-windows-terminal\/\" target=\"_blank\" rel=\"noopener noreferrer\">here<\/a>.\u00a0 My PowerShell 7 profile has code to use a custom prompt to rotate images. However, I realized that it only makes snese to run that code if my PowerShell 7 session is running in Windows Terminal. I needed a way to discover that piece of information.<\/p>\n<p><!--more--><\/p>\n<p>In PowerShell 7, actually beginning back in PowerShell Core, you can easily get the parent process.<\/p>\n<p><a href=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2019\/12\/image-27.png\"><img loading=\"lazy\" decoding=\"async\" style=\"display: inline; background-image: none;\" title=\"Getting the grandparent process in PowerShell\" src=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2019\/12\/image_thumb-27.png\" alt=\"Getting the parent process in PowerShell\" width=\"1028\" height=\"202\" border=\"0\" \/><\/a><\/p>\n<p>$PID is an automatic variable that reflects the current PowerShell process id. I should point out that this session IS running in Windows Terminal. The tricky thing is that right now I'm launching using the pwsh-preview command which is really a batch file that is launching pwsh.exe. I could probably modify the Windows Terminal profile to launch the v7 executable directly but it doesn't matter. I can check the grandparent process.<\/p>\n<p><a href=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2019\/12\/image-28.png\"><img loading=\"lazy\" decoding=\"async\" style=\"margin: 0px; display: inline; background-image: none;\" title=\"image\" src=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2019\/12\/image_thumb-28.png\" alt=\"image\" width=\"1028\" height=\"199\" border=\"0\" \/><\/a><\/p>\n<p>And in fact, I am running in Windows Terminal.<\/p>\n<p>In Windows PowerShell, the story is a little different because there is no CodePproperty to return the parent process when using <a title=\"Read online help for this command\" href=\"http:\/\/go.microsoft.com\/fwlink\/?LinkID=113324\" target=\"_blank\" rel=\"noopener noreferrer\">Get-Process<\/a>. Fortunately, you can use <a title=\"read online help for this command\" href=\"http:\/\/go.microsoft.com\/fwlink\/?linkid=287299\" target=\"_blank\" rel=\"noopener noreferrer\">Get-CimInstance<\/a> to retrieve the information.<\/p>\n<p><a href=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2019\/12\/image-29.png\"><img loading=\"lazy\" decoding=\"async\" style=\"display: inline; background-image: none;\" title=\"Getting the parent process with Get-CimInstance\" src=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2019\/12\/image_thumb-29.png\" alt=\"Getting the parent process with Get-CimInstance\" width=\"1028\" height=\"460\" border=\"0\" \/><\/a><\/p>\n<p>With these snippets, I built\u00a0 a relatively simple function which you can find as a GitHub gist.<\/p>\n<p><script src=\"https:\/\/gist.github.com\/jdhitsolutions\/008d0479ee081d8788eec3fbde620df4.js\"><\/script><\/p>\n<p>In my Profile I can dot source the function and set a variable:<\/p>\n<pre>$inWindowsTerminal = Test-IsWindowsTerminal<\/pre>\n<p>If I have to run something that depends on WindowsTerminal, I now have a way to check.<\/p>\n<p>The function won't work if you are running PowerShell in a WSL instance hosted in Windows Terminal. It also won't work if you are running a nested PowerShell instance since I'm not checking anything beyond the grandparent process. Although you could modify the code to loop through until you reach the oldest ancestor process.<\/p>\n<p>I included verbose output as well.<\/p>\n<p><a href=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2019\/12\/image-30.png\"><img loading=\"lazy\" decoding=\"async\" style=\"display: inline; background-image: none;\" title=\"Testing with verbose output\" src=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2019\/12\/image_thumb-30.png\" alt=\"Testing with verbose output\" width=\"1028\" height=\"222\" border=\"0\" \/><\/a><\/p>\n<p>I hope you find this useful. Enjoy and have a great weekend.<\/p>\n<h3>Update:<\/h3>\n<p>Shortly after publishing, I got a very useful comment that reminded me that the Windows Terminal team adds an environmental variable to provide GUID. This means you can create a very, very simple function like this: <!--StartFragment --><\/p>\n<pre class=\"\">Function Test-IsWindowsTerminal { [bool]($env:WT_Session)}<\/pre>\n<p><!--EndFragment --><\/p>\n<p>Or you can use my function if you want a bit more detail about the process itself.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I have pretty much migrated to Windows Terminal as my primary PowerShell interface. Even though my daily session is PowerShell 7 I love that I can open up other sessions in the same application. yes, I know there are still limitations and that many of you prefer ConEmu. And that&#8217;s fine. Windows Terminal suits my&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"New on the blog: Testing for #PowerShell in Windows Terminal","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[4,615],"tags":[224,534,609],"class_list":["post-7112","post","type-post","status-publish","format-standard","hentry","category-powershell","category-windows-terminal","tag-function","tag-powershell","tag-windowsterminal"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Testing for PowerShell in Windows Terminal &#8226; The Lonely Administrator<\/title>\n<meta name=\"description\" content=\"I needed a way to discover if a PowerShell session was running in Windows Terminal. This is actually easy for PowerShell 7. I wrote a function to make it easy.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/jdhitsolutions.com\/blog\/powershell\/7112\/testing-for-powershell-in-windows-terminal\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Testing for PowerShell in Windows Terminal &#8226; The Lonely Administrator\" \/>\n<meta property=\"og:description\" content=\"I needed a way to discover if a PowerShell session was running in Windows Terminal. This is actually easy for PowerShell 7. I wrote a function to make it easy.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/jdhitsolutions.com\/blog\/powershell\/7112\/testing-for-powershell-in-windows-terminal\/\" \/>\n<meta property=\"og:site_name\" content=\"The Lonely Administrator\" \/>\n<meta property=\"article:published_time\" content=\"2019-12-20T16:21:38+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2019-12-20T16:58:40+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2019\/12\/image_thumb-27.png\" \/>\n<meta name=\"author\" content=\"Jeffery Hicks\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@JeffHicks\" \/>\n<meta name=\"twitter:site\" content=\"@JeffHicks\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Jeffery Hicks\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/7112\\\/testing-for-powershell-in-windows-terminal\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/7112\\\/testing-for-powershell-in-windows-terminal\\\/\"},\"author\":{\"name\":\"Jeffery Hicks\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#\\\/schema\\\/person\\\/d0258030b41f07fd745f4078bdf5b6c9\"},\"headline\":\"Testing for PowerShell in Windows Terminal\",\"datePublished\":\"2019-12-20T16:21:38+00:00\",\"dateModified\":\"2019-12-20T16:58:40+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/7112\\\/testing-for-powershell-in-windows-terminal\\\/\"},\"wordCount\":430,\"commentCount\":5,\"publisher\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#\\\/schema\\\/person\\\/d0258030b41f07fd745f4078bdf5b6c9\"},\"image\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/7112\\\/testing-for-powershell-in-windows-terminal\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/wp-content\\\/uploads\\\/2019\\\/12\\\/image_thumb-27.png\",\"keywords\":[\"Function\",\"PowerShell\",\"WindowsTerminal\"],\"articleSection\":[\"PowerShell\",\"Windows Terminal\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/7112\\\/testing-for-powershell-in-windows-terminal\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/7112\\\/testing-for-powershell-in-windows-terminal\\\/\",\"url\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/7112\\\/testing-for-powershell-in-windows-terminal\\\/\",\"name\":\"Testing for PowerShell in Windows Terminal &#8226; The Lonely Administrator\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/7112\\\/testing-for-powershell-in-windows-terminal\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/7112\\\/testing-for-powershell-in-windows-terminal\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/wp-content\\\/uploads\\\/2019\\\/12\\\/image_thumb-27.png\",\"datePublished\":\"2019-12-20T16:21:38+00:00\",\"dateModified\":\"2019-12-20T16:58:40+00:00\",\"description\":\"I needed a way to discover if a PowerShell session was running in Windows Terminal. This is actually easy for PowerShell 7. I wrote a function to make it easy.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/7112\\\/testing-for-powershell-in-windows-terminal\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/7112\\\/testing-for-powershell-in-windows-terminal\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/7112\\\/testing-for-powershell-in-windows-terminal\\\/#primaryimage\",\"url\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/wp-content\\\/uploads\\\/2019\\\/12\\\/image_thumb-27.png\",\"contentUrl\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/wp-content\\\/uploads\\\/2019\\\/12\\\/image_thumb-27.png\",\"width\":1028,\"height\":202},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/7112\\\/testing-for-powershell-in-windows-terminal\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"PowerShell\",\"item\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/category\\\/powershell\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Testing for PowerShell in Windows Terminal\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/\",\"name\":\"The Lonely Administrator\",\"description\":\"Practical Advice for the Automating IT Pro\",\"publisher\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#\\\/schema\\\/person\\\/d0258030b41f07fd745f4078bdf5b6c9\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#\\\/schema\\\/person\\\/d0258030b41f07fd745f4078bdf5b6c9\",\"name\":\"Jeffery Hicks\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/832ae5d438fdcfc1420d720cd1991307927de8a0b12f2342e81c30f773e21098?s=96&d=wavatar&r=pg\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/832ae5d438fdcfc1420d720cd1991307927de8a0b12f2342e81c30f773e21098?s=96&d=wavatar&r=pg\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/832ae5d438fdcfc1420d720cd1991307927de8a0b12f2342e81c30f773e21098?s=96&d=wavatar&r=pg\",\"caption\":\"Jeffery Hicks\"},\"logo\":{\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/832ae5d438fdcfc1420d720cd1991307927de8a0b12f2342e81c30f773e21098?s=96&d=wavatar&r=pg\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Testing for PowerShell in Windows Terminal &#8226; The Lonely Administrator","description":"I needed a way to discover if a PowerShell session was running in Windows Terminal. This is actually easy for PowerShell 7. I wrote a function to make it easy.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/jdhitsolutions.com\/blog\/powershell\/7112\/testing-for-powershell-in-windows-terminal\/","og_locale":"en_US","og_type":"article","og_title":"Testing for PowerShell in Windows Terminal &#8226; The Lonely Administrator","og_description":"I needed a way to discover if a PowerShell session was running in Windows Terminal. This is actually easy for PowerShell 7. I wrote a function to make it easy.","og_url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/7112\/testing-for-powershell-in-windows-terminal\/","og_site_name":"The Lonely Administrator","article_published_time":"2019-12-20T16:21:38+00:00","article_modified_time":"2019-12-20T16:58:40+00:00","og_image":[{"url":"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2019\/12\/image_thumb-27.png","type":"","width":"","height":""}],"author":"Jeffery Hicks","twitter_card":"summary_large_image","twitter_creator":"@JeffHicks","twitter_site":"@JeffHicks","twitter_misc":{"Written by":"Jeffery Hicks","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/7112\/testing-for-powershell-in-windows-terminal\/#article","isPartOf":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/7112\/testing-for-powershell-in-windows-terminal\/"},"author":{"name":"Jeffery Hicks","@id":"https:\/\/jdhitsolutions.com\/blog\/#\/schema\/person\/d0258030b41f07fd745f4078bdf5b6c9"},"headline":"Testing for PowerShell in Windows Terminal","datePublished":"2019-12-20T16:21:38+00:00","dateModified":"2019-12-20T16:58:40+00:00","mainEntityOfPage":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/7112\/testing-for-powershell-in-windows-terminal\/"},"wordCount":430,"commentCount":5,"publisher":{"@id":"https:\/\/jdhitsolutions.com\/blog\/#\/schema\/person\/d0258030b41f07fd745f4078bdf5b6c9"},"image":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/7112\/testing-for-powershell-in-windows-terminal\/#primaryimage"},"thumbnailUrl":"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2019\/12\/image_thumb-27.png","keywords":["Function","PowerShell","WindowsTerminal"],"articleSection":["PowerShell","Windows Terminal"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/jdhitsolutions.com\/blog\/powershell\/7112\/testing-for-powershell-in-windows-terminal\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/7112\/testing-for-powershell-in-windows-terminal\/","url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/7112\/testing-for-powershell-in-windows-terminal\/","name":"Testing for PowerShell in Windows Terminal &#8226; The Lonely Administrator","isPartOf":{"@id":"https:\/\/jdhitsolutions.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/7112\/testing-for-powershell-in-windows-terminal\/#primaryimage"},"image":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/7112\/testing-for-powershell-in-windows-terminal\/#primaryimage"},"thumbnailUrl":"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2019\/12\/image_thumb-27.png","datePublished":"2019-12-20T16:21:38+00:00","dateModified":"2019-12-20T16:58:40+00:00","description":"I needed a way to discover if a PowerShell session was running in Windows Terminal. This is actually easy for PowerShell 7. I wrote a function to make it easy.","breadcrumb":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/7112\/testing-for-powershell-in-windows-terminal\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/jdhitsolutions.com\/blog\/powershell\/7112\/testing-for-powershell-in-windows-terminal\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/7112\/testing-for-powershell-in-windows-terminal\/#primaryimage","url":"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2019\/12\/image_thumb-27.png","contentUrl":"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2019\/12\/image_thumb-27.png","width":1028,"height":202},{"@type":"BreadcrumbList","@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/7112\/testing-for-powershell-in-windows-terminal\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"PowerShell","item":"https:\/\/jdhitsolutions.com\/blog\/category\/powershell\/"},{"@type":"ListItem","position":2,"name":"Testing for PowerShell in Windows Terminal"}]},{"@type":"WebSite","@id":"https:\/\/jdhitsolutions.com\/blog\/#website","url":"https:\/\/jdhitsolutions.com\/blog\/","name":"The Lonely Administrator","description":"Practical Advice for the Automating IT Pro","publisher":{"@id":"https:\/\/jdhitsolutions.com\/blog\/#\/schema\/person\/d0258030b41f07fd745f4078bdf5b6c9"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/jdhitsolutions.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/jdhitsolutions.com\/blog\/#\/schema\/person\/d0258030b41f07fd745f4078bdf5b6c9","name":"Jeffery Hicks","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/832ae5d438fdcfc1420d720cd1991307927de8a0b12f2342e81c30f773e21098?s=96&d=wavatar&r=pg","url":"https:\/\/secure.gravatar.com\/avatar\/832ae5d438fdcfc1420d720cd1991307927de8a0b12f2342e81c30f773e21098?s=96&d=wavatar&r=pg","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/832ae5d438fdcfc1420d720cd1991307927de8a0b12f2342e81c30f773e21098?s=96&d=wavatar&r=pg","caption":"Jeffery Hicks"},"logo":{"@id":"https:\/\/secure.gravatar.com\/avatar\/832ae5d438fdcfc1420d720cd1991307927de8a0b12f2342e81c30f773e21098?s=96&d=wavatar&r=pg"}}]}},"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_likes_enabled":true,"jetpack-related-posts":[{"id":7476,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/7476\/open-windows-terminal-powershell-split-paned\/","url_meta":{"origin":7112,"position":0},"title":"Open Windows Terminal PowerShell Split Paned","author":"Jeffery Hicks","date":"May 14, 2020","format":false,"excerpt":"The other night I presented for the Mississippi PowerShell User Group on how to get started using Windows Terminal. This has been my go-to PowerShell console for quite a while. I use Windows Terminal for everything. During the talk a question came up about starting a session with split panes.\u2026","rel":"","context":"In &quot;PowerShell&quot;","block_context":{"text":"PowerShell","link":"https:\/\/jdhitsolutions.com\/blog\/category\/powershell\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/05\/wt-split.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/05\/wt-split.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/05\/wt-split.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/05\/wt-split.png?resize=700%2C400&ssl=1 2x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/05\/wt-split.png?resize=1050%2C600&ssl=1 3x"},"classes":[]},{"id":5073,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/5073\/powershell-sessions-and-vs-code\/","url_meta":{"origin":7112,"position":1},"title":"PowerShell Sessions and VS Code","author":"Jeffery Hicks","date":"June 8, 2016","format":false,"excerpt":"If you do any amount of PowerShell scripting you have most likely heard about Visual Studio Code. This is a free cross-platform light-weight editor from Microsoft. VS Code supports multiple languages and is extensible. I've tried different versions since it was first released but never found a reason to jump\u2026","rel":"","context":"In &quot;PowerShell&quot;","block_context":{"text":"PowerShell","link":"https:\/\/jdhitsolutions.com\/blog\/category\/powershell\/"},"img":{"alt_text":"image","src":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2016\/06\/image_thumb-5.png?resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2016\/06\/image_thumb-5.png?resize=350%2C200 1x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2016\/06\/image_thumb-5.png?resize=525%2C300 1.5x"},"classes":[]},{"id":7242,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/7242\/powershell-remoting-profiles-with-windows-terminal\/","url_meta":{"origin":7112,"position":2},"title":"PowerShell Remoting Profiles with Windows Terminal","author":"Jeffery Hicks","date":"February 10, 2020","format":false,"excerpt":"I have jumped in the deep end and fully committed to Windows Terminal as my default PowerShell environment. I love having one interface with tabs for different terminal profiles. Windows Terminal makes it easy for me to have tabs open to PowerShell 7, Windows PowerShell, an Ubuntu instance or even\u2026","rel":"","context":"In &quot;PowerShell&quot;","block_context":{"text":"PowerShell","link":"https:\/\/jdhitsolutions.com\/blog\/category\/powershell\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/02\/image_thumb-8.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/02\/image_thumb-8.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/02\/image_thumb-8.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/02\/image_thumb-8.png?resize=700%2C400&ssl=1 2x"},"classes":[]},{"id":7424,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/7424\/powershell-helper-scripts-for-windows-terminal\/","url_meta":{"origin":7112,"position":3},"title":"PowerShell Helper Scripts for Windows Terminal","author":"Jeffery Hicks","date":"May 1, 2020","format":false,"excerpt":"I've spent some time over the last few days getting my Windows Terminal setup in order. Hopefull you saw my recent post about backing up my settings.json file. I've also put together a few other simple PowerShell scripts that I use to make Windows Terminal even easier to use and\u2026","rel":"","context":"In &quot;PowerShell&quot;","block_context":{"text":"PowerShell","link":"https:\/\/jdhitsolutions.com\/blog\/category\/powershell\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/05\/wtprocess.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/05\/wtprocess.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/05\/wtprocess.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/05\/wtprocess.png?resize=700%2C400&ssl=1 2x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/05\/wtprocess.png?resize=1050%2C600&ssl=1 3x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/05\/wtprocess.png?resize=1400%2C800&ssl=1 4x"},"classes":[]},{"id":7429,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/7429\/a-powershell-windows-terminal-toolbox\/","url_meta":{"origin":7112,"position":4},"title":"A PowerShell Windows Terminal Toolbox","author":"Jeffery Hicks","date":"May 5, 2020","format":false,"excerpt":"Last week I shared some PowerShell code I had been using to manage different aspects of Windows Terminal. I also had posted a script to backup my Windows Terminal settings file.\u00a0 With all that code, plus other ideas brewing, it only made sense to bundle everything together into a PowerShell\u2026","rel":"","context":"In &quot;PowerShell&quot;","block_context":{"text":"PowerShell","link":"https:\/\/jdhitsolutions.com\/blog\/category\/powershell\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/05\/wtkeybindings.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/05\/wtkeybindings.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/05\/wtkeybindings.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/05\/wtkeybindings.png?resize=700%2C400&ssl=1 2x"},"classes":[]},{"id":7257,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/7257\/cross-platform-powershell-profiles-with-windows-terminal\/","url_meta":{"origin":7112,"position":5},"title":"Cross Platform PowerShell Profiles with Windows Terminal","author":"Jeffery Hicks","date":"February 13, 2020","format":false,"excerpt":"Earlier this week I shared my techniques for creating a Windows Terminal profile that would open a remote PowerShell session. But with PowerShell 7, I can also connect to non-Windows machines using SSH. So why not extend my code to allow connecting to a Linux box? Before you try anything\u2026","rel":"","context":"In &quot;PowerShell&quot;","block_context":{"text":"PowerShell","link":"https:\/\/jdhitsolutions.com\/blog\/category\/powershell\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"_links":{"self":[{"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/7112","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/comments?post=7112"}],"version-history":[{"count":0,"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/7112\/revisions"}],"wp:attachment":[{"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/media?parent=7112"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/categories?post=7112"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/tags?post=7112"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}