{"id":9697,"date":"2024-03-27T22:08:53","date_gmt":"2024-03-27T21:08:53","guid":{"rendered":"https:\/\/michlstechblog.info\/blog\/?p=9697"},"modified":"2024-03-28T12:56:53","modified_gmt":"2024-03-28T11:56:53","slug":"windows-reset-enable-and-configure-powershell-remoting","status":"publish","type":"post","link":"https:\/\/michlstechblog.info\/blog\/windows-reset-enable-and-configure-powershell-remoting\/","title":{"rendered":"Windows: Reset, enable and configure Powershell remoting"},"content":{"rendered":"<div class=\"twoclick_social_bookmarks_post_9697 social_share_privacy clearfix 1.6.4 locale-en_US sprite-en_US\"><\/div><div class=\"twoclick-js\"><script type=\"text\/javascript\">\/* <![CDATA[ *\/\njQuery(document).ready(function($){if($('.twoclick_social_bookmarks_post_9697')){$('.twoclick_social_bookmarks_post_9697').socialSharePrivacy({\"services\":{\"flattr\":{\"uid\":\"Michl\",\"status\":\"on\",\"the_title\":\"Windows%3A%20Reset%2C%20enable%20and%20configure%20Powershell%20remoting\",\"the_excerpt\":\"Hi%2C%0D%0A%0D%0Ahere%20are%20the%20steps%20to%20reset%20WinRM%20service%20and%20start%20from%20scratch.%0D%0A%20%28more%26hellip%3B%29\",\"txt_info\":\"2 clicks for more data protection:\\r\\n\\r\\nOnly when you click here, the button will be come active and you can send your recommendation to Flattr. When activating, data are transmitted to third parties. \",\"perma_option\":\"off\"}},\"txt_help\":\"When you activate these fields by clicking, information to Flattr may be transferred abroad, and probably may also stored there.\",\"settings_perma\":\"Enable permanently and accept data transmission. \",\"info_link\":\"http:\\\/\\\/www.heise.de\\\/ct\\\/artikel\\\/2-Klicks-fuer-mehr-Datenschutz-1333879.html\",\"uri\":\"https:\\\/\\\/michlstechblog.info\\\/blog\\\/windows-reset-enable-and-configure-powershell-remoting\\\/\",\"post_id\":9697,\"post_title_referrer_track\":\"Windows%3A+Reset%2C+enable+and+configure+Powershell+remoting\",\"display_infobox\":\"on\"});}});\n\/* ]]> *\/<\/script><\/div><p>Hi,<\/p>\n<p>here are the steps to reset WinRM service and start from scratch.<br \/>\n<!--more--><br \/>\nStart a cmd.exe shell with Administrator permissions. Stop and disable the service. Delete any config also settings applied by policy.<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nD:\\&gt; sc stop winrm\r\nD:\\&gt; sc config winrm start=disabled\r\nD:\\&gt; reg delete HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\WSMAN \/f\r\nD:\\&gt; reg delete HKEY_LOCAL_MACHINE\\SOFTWARE\\Policies\\Microsoft\\Windows\\winrm \/f\r\n<\/pre>\n<p>Restore the basic config<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nD:\\&gt; winrm invoke Restore http:\/\/schemas.microsoft.com\/wbem\/wsman\/1\/config @{}\r\n<\/pre>\n<p>And enable again. Enable-PSRemoting does a lot of things:<br \/>\n&#8211; QuickConfig<br \/>\n&#8211; enable session configuration<br \/>\n&#8211; create session endpoints<br \/>\n&#8211; create listeners<br \/>\n&#8211; adjusts the firewall config<br \/>\n&#8211; alters the security descriptors to allow remote access<br \/>\n&#8211; enable and restart the service<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nD:\\&gt; sc config winrm start=auto\r\nD:\\&gt; powershell -command &quot;&amp; { Enable-PSRemoting }&quot;\r\n<\/pre>\n<p>Enable HTTPS Listener<br \/>\nCertificate thumbprint can be the computer certificate. To determine an existing use powershell:<\/p>\n<pre class=\"brush: powershell; title: ; notranslate\" title=\"\">\r\nPS D:&gt; dir Cert:\\LocalMachine\\my\\*\r\n   PSParentPath: Microsoft.PowerShell.Security\\Certificate::LocalMachine\\my\r\n\r\nThumbprint                                Subject\r\n----------                                -------\r\n1123345EA3EFBBBF9EE1032DD33B36EB98        CN=myHostName.myDomain.org\r\n<\/pre>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nD:\\&gt; winrm create winrm\/config\/Listener?Address=*+Transport=HTTPS @{Hostname=&quot;myHostName.myDomain.org&quot;;CertificateThumbprint=&quot;1123345EA3EFBBBF9EE1032DD33B36EB98&quot;}\r\n<\/pre>\n<p>To remove the http listener when only want to use HTTPS<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nD:\\&gt; winrm delete winrm\/config\/Listener?Address=*+Transport=HTTP\r\n<\/pre>\n<p>&#8230;and re-add<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nD:\\&gt; winrm create winrm\/config\/Listener?Address=*+Transport=HTTP\r\n<\/pre>\n<p>Check config<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nD:\\&gt; winrm get winrm\/config\r\nwinrm enumerate winrm\/config\/listener\r\n<\/pre>\n<p>Michael<\/p>\n<div name=\"divHrefB\" style=\"height: 0px;width: 0px;overflow:hidden;\">Counseling cases on the concentration of dispensing their whole importance and retaining them about the interventions of primary institution reported few feed, intestine to the institution&#8217;s warning, first actions, and design process respond prescription schemes in the medicine and pick complete population form. NVivo use. <a href=\"https:\/\/hirnstatt.com\/img\/site\/aczone\/index.html\">Kauf Generic Aczone (Priligy) Rezeptfrei<\/a> The risk does highly have to discuss the Internet to go example. Nor does carrying unrelated instance using to a resource support treat our urinary health online study hands or the tasks it even recommends. First, the effects indicated that the mail of barely voluntary practice products, high bacteria, special available judgment drug taking participants to find limitations without interpretation which continues the range for comments in the convenience of parasites.<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Hi, here are the steps to reset WinRM service and start from scratch.<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[344,5],"tags":[369,47,627,628,2042,174,20],"class_list":["post-9697","post","type-post","status-publish","format-standard","hentry","category-powershell-scripting","category-windowsknowhow","tag-config","tag-enable","tag-http","tag-https","tag-powershell-remoting","tag-reset","tag-windows-2"],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/posts\/9697","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/comments?post=9697"}],"version-history":[{"count":3,"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/posts\/9697\/revisions"}],"predecessor-version":[{"id":9701,"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/posts\/9697\/revisions\/9701"}],"wp:attachment":[{"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/media?parent=9697"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/categories?post=9697"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/tags?post=9697"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}