{"id":7347,"date":"2020-03-10T10:45:07","date_gmt":"2020-03-10T14:45:07","guid":{"rendered":"https:\/\/jdhitsolutions.com\/blog\/?p=7347"},"modified":"2020-03-10T10:45:07","modified_gmt":"2020-03-10T14:45:07","slug":"powershell-7-remoting-cleanup","status":"publish","type":"post","link":"https:\/\/jdhitsolutions.com\/blog\/powershell-7\/7347\/powershell-7-remoting-cleanup\/","title":{"rendered":"PowerShell 7 Remoting Cleanup"},"content":{"rendered":"<p>Now that <a href=\"https:\/\/github.com\/powershell\/powershell\" target=\"_blank\" rel=\"noopener noreferrer\">PowerShell 7<\/a> is here and hopefully installed on your Windows 10 desktop, you're good to go, right? I'd say you probably all set. However, if like me, you were running PowerShell 7 betas or had PowerShell Core also installed, a little housekeeping might be in order. I don't think what I'm going to discuss has any serious implications. But I like to maintain a tidy system and I'm betting many of you do as well.<\/p>\n<h2>PSSessionConfigurations For Everyone<\/h2>\n<p>On my Windows 10 desktop, I had been running PowerShell Core, the 6.x version of PowerShell, as well as the PowerShell 7 betas and release candidates. I enabled remoting over WSMan with each. Over time, this has left me with multiple PSSessionConfiguration settings.<\/p>\n<p><a href=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/03\/image.png\"><img loading=\"lazy\" decoding=\"async\" style=\"margin: 0px; display: inline; background-image: none;\" title=\"image\" src=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/03\/image_thumb.png\" alt=\"image\" width=\"1028\" height=\"352\" border=\"0\" \/><\/a><\/p>\n<p>In PowerShell 7, you don't see the PowerShell 5.1 sessions. I doubt there are any issues with simply leaving these here, but it feels messy to me. At this point, I've already uninstalled PowerShell Core 6.x so I definitely don't need the related sessions. Digging a little deeper I can discover what these sessions are pointing to.<\/p>\n<p><a href=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/03\/image-1.png\"><img loading=\"lazy\" decoding=\"async\" style=\"display: inline; background-image: none;\" title=\"image\" src=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/03\/image_thumb-1.png\" alt=\"image\" width=\"1028\" height=\"285\" border=\"0\" \/><\/a><\/p>\n<p>My first thought was that some of these files have since been deleted. I figured I could use PowerShell to determine which sessions still have valid plugin files.<\/p>\n<p><a href=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/03\/image-2.png\"><img loading=\"lazy\" decoding=\"async\" style=\"margin: 0px; display: inline; background-image: none;\" title=\"image\" src=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/03\/image_thumb-2.png\" alt=\"image\" width=\"1028\" height=\"251\" border=\"0\" \/><\/a><\/p>\n<p>This surprised me. But it was easily verified.<\/p>\n<p><a href=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/03\/image-3.png\"><img loading=\"lazy\" decoding=\"async\" style=\"margin: 0px; display: inline; background-image: none;\" title=\"image\" src=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/03\/image_thumb-3.png\" alt=\"image\" width=\"1028\" height=\"629\" border=\"0\" \/><\/a><\/p>\n<p>Even though the PowerShell v6.x editions had long been uninstalled, these locations remained. Along older PowerShell 7 bits.<\/p>\n<h2>Version Cleanup<\/h2>\n<p>When you install the final release of PowerShell 7 and enable remoting you will get folders labeled 7 and 7.0.0. The plugin files in each folder are identical. From what I have learned so far this is by design. There is a generic PowerShell 7 folder and then a version specific folder, 7.0.0. Presumably, at some point in the future I'll install something like PowerShell 7.1.0 which will overwrite the 7.0.0 folder. I'm trying to learn more about this,\u00a0 but for now that doesn't factor into my cleanup tasks.<\/p>\n<p>My clean up will consist of removing the obsolete files and folders and unregistering the obsolete PSSessionConfigurations.<\/p>\n<pre class=\"lang:ps mark:0 decode:true\">#requires -version 7.0\n\n[cmdletbinding(SupportsShouldProcess)]\nParam()\n\n#clean up folders\nGet-Childitem -path $env:windir\\system32\\powershell -directory |\nWhere-object {$_.name -notmatch \"^7(\\.0\\.0)?$\"} | Remove-Item -Force -Recurse\n\n#clean up sessions\nGet-PSSessionConfiguration | Where-object {$_.name -notmatch \"^Powershell\\.7(\\.0\\.0)?$\"} | \n<a title=\"Read online help for this command\" href=\"http:\/\/go.microsoft.com\/fwlink\/?LinkID=144308\" target=\"_blank\" rel=\"noopener noreferrer\">Unregister-PSSessionConfiguration<\/a> -Force -NoServiceRestart\n\nWrite-Warning \"You will need to restart the WinRM service for these changes to take effect\"\n<\/pre>\n<p>The script file uses a regular expression pattern to keep the current PowerShell 7.0.0 files and sessions. I also included support for -WhatIf.<\/p>\n<p><a href=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/03\/image-4.png\"><img loading=\"lazy\" decoding=\"async\" style=\"margin: 0px; display: inline; background-image: none;\" title=\"image\" src=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/03\/image_thumb-4.png\" alt=\"image\" width=\"1028\" height=\"363\" border=\"0\" \/><\/a><\/p>\n<p>I figured I was all set. But apparently not.<\/p>\n<p><a href=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/03\/image-5.png\"><img loading=\"lazy\" decoding=\"async\" style=\"display: inline; background-image: none;\" title=\"image\" src=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/03\/image_thumb-5.png\" alt=\"image\" width=\"1028\" height=\"247\" border=\"0\" \/><\/a><\/p>\n<p>I suspect that I should have removed the session configuration before removing the files. So I have revised my script.<\/p>\n<pre class=\"lang:ps mark:0 decode:true\">[cmdletbinding(SupportsShouldProcess)]\nParam()\n\n#clean up sessions\n$sessions = Get-PSSessionConfiguration | Where-Object {$_.name -notmatch \"^Powershell\\.7(\\.0\\.0)?$\"}\nforeach ($session in $sessions) { \n    Try {\n        Unregister-PSSessionConfiguration -Name $session.name -Force -NoServiceRestart -ErrorAction Stop\n    }\n    Catch {\n        #Fall back to this if the cmdlet fails\n        winrm delete http:\/\/schemas.microsoft.com\/wbem\/wsman\/1\/config\/plugin?Name=$($session.name)\n    }\n}\n\n#clean up folders\nGet-Childitem -path $env:windir\\system32\\powershell -directory |\nWhere-object {$_.name -notmatch \"^7(\\.0\\.0)?$\"} | Remove-Item -Force -Recurse\n<\/pre>\n<p>In this version, if Unregister-PSSessionConfiguration fails, I'll fall back to the winrm command line tool. However, when I try again, I still get errors. In fact, I appear to have completely botched things up. But that's ok. That's how I can learn more. Any perhaps some of you might encounter equally trashed environments.<\/p>\n<h2>Digging Deeper<\/h2>\n<p>What I should have done, is backed up the files before I deleted them. Or created a system restore point. You should keep that in mind. In my case, I'm going to need to go an alternate route because even after restarting the WinRM service, My WSMan configuration is still looking for plugin configurations. These are stored in the registry.<\/p>\n<p><a href=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/03\/image-6.png\"><img loading=\"lazy\" decoding=\"async\" style=\"margin: 0px; display: inline; background-image: none;\" title=\"image\" src=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/03\/image_thumb-6.png\" alt=\"image\" width=\"1028\" height=\"486\" border=\"0\" \/><\/a><\/p>\n<p>I'm working under the assumption that if I remove the obsolete registry entries, I can get over the <a title=\"Read online help for this command\" href=\"http:\/\/go.microsoft.com\/fwlink\/?LinkID=144304\" target=\"_blank\" rel=\"noopener noreferrer\">Get-PSSessionConfiguration<\/a> error.<\/p>\n<pre class=\"lang:ps mark:0 decode:true\">$regPath = \"HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\WSMAN\\Plugin\"\n#get the PowerShell plugins\n$ps = Get-Childitem -path $regPath | Where {$_.PSChildName -match \"^PowerShell\"}\n#filter the ones to remove\n$remove = $ps | where-object {$_.pschildname -notmatch \"^Powershell\\.7(\\.0\\.0)?$\"}\n$remove | Remove-Item -Recurse -Force #-WhatIf\n<\/pre>\n<p>I tested with -WhatIf to verify I'm removing the correct entries. Once those entries are deleted, I finally have the PSSessionConfigurations I want.<\/p>\n<p><a href=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/03\/image-7.png\"><img loading=\"lazy\" decoding=\"async\" style=\"display: inline; background-image: none;\" title=\"image\" src=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/03\/image_thumb-7.png\" alt=\"image\" width=\"1028\" height=\"321\" border=\"0\" \/><\/a><\/p>\n<h2>Summary<\/h2>\n<p>You don't have to automate this type of cleanup. But if you do, it seems you should unregister the PSSessionConfiguration and then delete any left over files or registry keys that remain.\u00a0 Personally, I'm looking forward to someday using SSH for all my PowerShell remoting needs. But for now, WSMan still plays a role and might need a little attention every now and then.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Now that PowerShell 7 is here and hopefully installed on your Windows 10 desktop, you&#8217;re good to go, right? I&#8217;d say you probably all set. However, if like me, you were running PowerShell 7 betas or had PowerShell Core also installed, a little housekeeping might be in order. I don&#8217;t think what I&#8217;m going to&#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":"","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":[610],"tags":[534,624,490],"class_list":["post-7347","post","type-post","status-publish","format-standard","hentry","category-powershell-7","tag-powershell","tag-ps7now","tag-psblogweek"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>PowerShell 7 Remoting Cleanup &#8226; The Lonely Administrator<\/title>\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-7\/7347\/powershell-7-remoting-cleanup\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"PowerShell 7 Remoting Cleanup &#8226; The Lonely Administrator\" \/>\n<meta property=\"og:description\" content=\"Now that PowerShell 7 is here and hopefully installed on your Windows 10 desktop, you&#039;re good to go, right? I&#039;d say you probably all set. However, if like me, you were running PowerShell 7 betas or had PowerShell Core also installed, a little housekeeping might be in order. I don&#039;t think what I&#039;m going to...\" \/>\n<meta property=\"og:url\" content=\"https:\/\/jdhitsolutions.com\/blog\/powershell-7\/7347\/powershell-7-remoting-cleanup\/\" \/>\n<meta property=\"og:site_name\" content=\"The Lonely Administrator\" \/>\n<meta property=\"article:published_time\" content=\"2020-03-10T14:45:07+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/03\/image_thumb.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=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell-7\\\/7347\\\/powershell-7-remoting-cleanup\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell-7\\\/7347\\\/powershell-7-remoting-cleanup\\\/\"},\"author\":{\"name\":\"Jeffery Hicks\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#\\\/schema\\\/person\\\/d0258030b41f07fd745f4078bdf5b6c9\"},\"headline\":\"PowerShell 7 Remoting Cleanup\",\"datePublished\":\"2020-03-10T14:45:07+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell-7\\\/7347\\\/powershell-7-remoting-cleanup\\\/\"},\"wordCount\":624,\"commentCount\":1,\"publisher\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#\\\/schema\\\/person\\\/d0258030b41f07fd745f4078bdf5b6c9\"},\"image\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell-7\\\/7347\\\/powershell-7-remoting-cleanup\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/03\\\/image_thumb.png\",\"keywords\":[\"PowerShell\",\"PS7Now\",\"PSBlogWeek\"],\"articleSection\":[\"PowerShell 7\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell-7\\\/7347\\\/powershell-7-remoting-cleanup\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell-7\\\/7347\\\/powershell-7-remoting-cleanup\\\/\",\"url\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell-7\\\/7347\\\/powershell-7-remoting-cleanup\\\/\",\"name\":\"PowerShell 7 Remoting Cleanup &#8226; The Lonely Administrator\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell-7\\\/7347\\\/powershell-7-remoting-cleanup\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell-7\\\/7347\\\/powershell-7-remoting-cleanup\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/03\\\/image_thumb.png\",\"datePublished\":\"2020-03-10T14:45:07+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell-7\\\/7347\\\/powershell-7-remoting-cleanup\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell-7\\\/7347\\\/powershell-7-remoting-cleanup\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell-7\\\/7347\\\/powershell-7-remoting-cleanup\\\/#primaryimage\",\"url\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/03\\\/image_thumb.png\",\"contentUrl\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/03\\\/image_thumb.png\",\"width\":1028,\"height\":352},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell-7\\\/7347\\\/powershell-7-remoting-cleanup\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"PowerShell 7\",\"item\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/category\\\/powershell-7\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"PowerShell 7 Remoting Cleanup\"}]},{\"@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":"PowerShell 7 Remoting Cleanup &#8226; The Lonely Administrator","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-7\/7347\/powershell-7-remoting-cleanup\/","og_locale":"en_US","og_type":"article","og_title":"PowerShell 7 Remoting Cleanup &#8226; The Lonely Administrator","og_description":"Now that PowerShell 7 is here and hopefully installed on your Windows 10 desktop, you're good to go, right? I'd say you probably all set. However, if like me, you were running PowerShell 7 betas or had PowerShell Core also installed, a little housekeeping might be in order. I don't think what I'm going to...","og_url":"https:\/\/jdhitsolutions.com\/blog\/powershell-7\/7347\/powershell-7-remoting-cleanup\/","og_site_name":"The Lonely Administrator","article_published_time":"2020-03-10T14:45:07+00:00","og_image":[{"url":"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/03\/image_thumb.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":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/jdhitsolutions.com\/blog\/powershell-7\/7347\/powershell-7-remoting-cleanup\/#article","isPartOf":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell-7\/7347\/powershell-7-remoting-cleanup\/"},"author":{"name":"Jeffery Hicks","@id":"https:\/\/jdhitsolutions.com\/blog\/#\/schema\/person\/d0258030b41f07fd745f4078bdf5b6c9"},"headline":"PowerShell 7 Remoting Cleanup","datePublished":"2020-03-10T14:45:07+00:00","mainEntityOfPage":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell-7\/7347\/powershell-7-remoting-cleanup\/"},"wordCount":624,"commentCount":1,"publisher":{"@id":"https:\/\/jdhitsolutions.com\/blog\/#\/schema\/person\/d0258030b41f07fd745f4078bdf5b6c9"},"image":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell-7\/7347\/powershell-7-remoting-cleanup\/#primaryimage"},"thumbnailUrl":"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/03\/image_thumb.png","keywords":["PowerShell","PS7Now","PSBlogWeek"],"articleSection":["PowerShell 7"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/jdhitsolutions.com\/blog\/powershell-7\/7347\/powershell-7-remoting-cleanup\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/jdhitsolutions.com\/blog\/powershell-7\/7347\/powershell-7-remoting-cleanup\/","url":"https:\/\/jdhitsolutions.com\/blog\/powershell-7\/7347\/powershell-7-remoting-cleanup\/","name":"PowerShell 7 Remoting Cleanup &#8226; The Lonely Administrator","isPartOf":{"@id":"https:\/\/jdhitsolutions.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell-7\/7347\/powershell-7-remoting-cleanup\/#primaryimage"},"image":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell-7\/7347\/powershell-7-remoting-cleanup\/#primaryimage"},"thumbnailUrl":"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/03\/image_thumb.png","datePublished":"2020-03-10T14:45:07+00:00","breadcrumb":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell-7\/7347\/powershell-7-remoting-cleanup\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/jdhitsolutions.com\/blog\/powershell-7\/7347\/powershell-7-remoting-cleanup\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/jdhitsolutions.com\/blog\/powershell-7\/7347\/powershell-7-remoting-cleanup\/#primaryimage","url":"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/03\/image_thumb.png","contentUrl":"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/03\/image_thumb.png","width":1028,"height":352},{"@type":"BreadcrumbList","@id":"https:\/\/jdhitsolutions.com\/blog\/powershell-7\/7347\/powershell-7-remoting-cleanup\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"PowerShell 7","item":"https:\/\/jdhitsolutions.com\/blog\/category\/powershell-7\/"},{"@type":"ListItem","position":2,"name":"PowerShell 7 Remoting Cleanup"}]},{"@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":5895,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/5895\/another-look-at-powershell-core-version-information\/","url_meta":{"origin":7347,"position":0},"title":"Another Look at PowerShell Core Version Information","author":"Jeffery Hicks","date":"February 8, 2018","format":false,"excerpt":"As PowerShell Core begins to spread into our world, and as we start thinking about working and scripting cross-platform, it will be useful to know what type of platform you are running on. The built in $PSVersionTable is an obvious place to start. On PowerShell Core there are also some\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\/2018\/02\/image_thumb-5.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2018\/02\/image_thumb-5.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2018\/02\/image_thumb-5.png?resize=525%2C300&ssl=1 1.5x"},"classes":[]},{"id":610,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell-v2-0\/610\/powershell-quick-start-on-server-core-r2\/","url_meta":{"origin":7347,"position":1},"title":"PowerShell Quick Start on Server Core R2","author":"Jeffery Hicks","date":"March 29, 2010","format":false,"excerpt":"The great thing about the Server Core flavor that ships with Windows Server 2008 R2 is that it finally supports Windows PowerShell. I\u2019ve talked about this before. However, I think I neglected some of the finer points in getting started. You can (and should) run PowerShell on your R2 Core\u2026","rel":"","context":"In &quot;PowerShell v2.0&quot;","block_context":{"text":"PowerShell v2.0","link":"https:\/\/jdhitsolutions.com\/blog\/category\/powershell-v2-0\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":8650,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/8650\/removing-obsolete-powershell-remoting-configurations\/","url_meta":{"origin":7347,"position":2},"title":"Removing Obsolete PowerShell Remoting Configurations","author":"Jeffery Hicks","date":"October 20, 2021","format":false,"excerpt":"I'm pretty sure I've discussed this before, but Microsoft is scheduled to release PowerShell 7.2 soon, I thought it might be good to revisit this topic. Here's the potential issue. If you've been installing PowerShell 7 releases for a while, and have been enabling PowerShell remoting, you most likely have\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\/2021\/10\/saved-config.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2021\/10\/saved-config.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2021\/10\/saved-config.png?resize=525%2C300&ssl=1 1.5x"},"classes":[]},{"id":7969,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell-7\/7969\/deploy-openssh-server-to-windows-10\/","url_meta":{"origin":7347,"position":3},"title":"Deploy OpenSSH Server to Windows 10","author":"Jeffery Hicks","date":"December 16, 2020","format":false,"excerpt":"PowerShell 7 offers a number of compelling reasons to adopt it. One of the best is support for SSH as a PowerShell remoting protocol. Unfortunately, this is not a topic that typically comes up for Windows-centric IT Pros. I know this is definitely true in my case, and a deficiency\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\/12\/sshserver-installed.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/12\/sshserver-installed.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/12\/sshserver-installed.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/12\/sshserver-installed.png?resize=700%2C400&ssl=1 2x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/12\/sshserver-installed.png?resize=1050%2C600&ssl=1 3x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/12\/sshserver-installed.png?resize=1400%2C800&ssl=1 4x"},"classes":[]},{"id":7361,"url":"https:\/\/jdhitsolutions.com\/blog\/scripting\/7361\/powershell-7-cross-platform-scripting-tips-and-traps\/","url_meta":{"origin":7347,"position":4},"title":"PowerShell 7 Cross-Platform Scripting Tips and Traps","author":"Jeffery Hicks","date":"March 13, 2020","format":false,"excerpt":"One of the reasons you want to adopt PowerShell 7 on your desktop, is that it can\u00a0 be used cross-platform. Theoretically, you can write a PowerShell script or function that works on Windows, Linux, and Mac. However, this is not without challenges. In some ways, it feels like we are\u2026","rel":"","context":"In &quot;PowerShell 7&quot;","block_context":{"text":"PowerShell 7","link":"https:\/\/jdhitsolutions.com\/blog\/category\/powershell-7\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/03\/hicks-scripting-4.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/03\/hicks-scripting-4.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/03\/hicks-scripting-4.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/03\/hicks-scripting-4.png?resize=700%2C400&ssl=1 2x"},"classes":[]},{"id":8499,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/8499\/using-the-powershell-ise-as-a-remote-management-console\/","url_meta":{"origin":7347,"position":5},"title":"Using the PowerShell ISE as a Remote Management Console","author":"Jeffery Hicks","date":"July 20, 2021","format":false,"excerpt":"Way back before the days of PowerShell Core, or even VS Code for that matter, the PowerShell ISE was the center of my PowerShell world. I spent a lot of time finding ways to make it easier for me to use and to push it to its limits. Naturally, the\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\/2021\/07\/ise-remotetab-form2.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]}],"_links":{"self":[{"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/7347","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=7347"}],"version-history":[{"count":0,"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/7347\/revisions"}],"wp:attachment":[{"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/media?parent=7347"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/categories?post=7347"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/tags?post=7347"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}