{"id":158,"date":"2019-08-29T07:18:26","date_gmt":"2019-08-29T13:18:26","guid":{"rendered":"https:\/\/cdbackslash.wpengine.com\/?p=158"},"modified":"2019-08-29T07:18:26","modified_gmt":"2019-08-29T13:18:26","slug":"how-to-resolving-a-system-hang-during-patching-remotely","status":"publish","type":"post","link":"https:\/\/www.cdbackslash.com\/?p=158","title":{"rendered":"How To: Resolving a System Hang During Patching, Remotely!"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">This is pretty awesome: <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Routine patching of systems and software is a crucial piece of any business&#8217; information security strategy. Even so, many systems go unnoticed and unpatched for months, even <em>years<\/em> until an external threat forces the organization into action (e.g. the recent WannaCry ransomware outbreak).<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">When that happens, server administrators need to be prepared for irregularities they&#8217;re likely to encounter, such as a hang prior to reboot.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In this scenario, we&#8217;re going to assume that you&#8217;ve just finished patching and clicked the &#8220;Restart Now&#8221; button. You begin a continuous ping (ping -t [hostname\/IP address]) and wait for the server to restart.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Let&#8217;s assume a normal reboot takes 5-10 minutes for this machine, and that 25+ minutes have passed.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">You check the console, and are greeted by the &#8220;&#8216;Preparing to Configure Windows. Do not turn off your computer&#8221; message. Time continues to pass while your maintenance window dwindles like falling grains in an hourglass\u2026 pressure is mounting, the business won\u2019t wait. Time for action!<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Logged in as an Administrator from your workstation check the Windows Module Installer service on the remote system&#8230;<\/strong><\/p>\n\n\n\n<ol class=\"wp-block-list\"><li> Run services.msc<\/li><li> Right-click \u201cServices (Local)\u201d and select \u201cConnect to another computer \u2026\u201d<\/li><li> Make sure the \u201cAnother computer\u201d radio button is selected and enter the hostname of the stuck server and click \u201cOK\u201d<\/li><li>Search for \u201cWindows Module Installer\u201d service and verify its status. If it\u2019s \u201cstopping,\u201d then you will need to force it to stop. This can\u2019t be done here, so we\u2019ll need to query its PID and use our old friend TaskKill to manually kill the service<br><\/li><\/ol>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Query the Process ID (PID) of the Windows Module Installer (TrustedInstaller) service\u2026<\/strong><\/p>\n\n\n\n<ol class=\"wp-block-list\"><li> Open Command Prompt as an Administrator<\/li><li>Run the following command: <br><code>sc \\\\[hostname of the server] queryex trustedinstaller<\/code> <br> <\/li><li>This will return (among other information) the PID of the stuck service, write it down as you\u2019ll need it for the next step<br><\/li><\/ol>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Kill the hung service remotely using TaskKill\u2026<\/strong><\/p>\n\n\n\n<ol class=\"wp-block-list\"><li> From the Command Prompt already opened, run the following command:<code>taskkill \/s [hostname of the server] \/pid [PID recorded above] \/t<\/code><\/li><\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">Source: <a rel=\"noreferrer noopener\" aria-label=\"https:\/\/it.toolbox.com\/blogs\/yousef-alahmad\/how-to-resolving-a-system-hang-during-patching-remotely-061417 (opens in a new tab)\" href=\"https:\/\/it.toolbox.com\/blogs\/yousef-alahmad\/how-to-resolving-a-system-hang-during-patching-remotely-061417\" target=\"_blank\">https:\/\/it.toolbox.com\/blogs\/yousef-alahmad\/how-to-resolving-a-system-hang-during-patching-remotely-061417<\/a><\/p>\n\n<div class=\"twitter-share\"><a href=\"https:\/\/twitter.com\/intent\/tweet?via=maxwellnation\" class=\"twitter-share-button\">Tweet<\/a><\/div>\n","protected":false},"excerpt":{"rendered":"<p>This is pretty awesome: Routine patching of systems and software is a crucial piece of any business&#8217; information security strategy. Even so, many systems go unnoticed and unpatched for months, even years until an external threat forces the organization into action (e.g. the recent WannaCry ransomware outbreak). When that happens, server administrators need to be &hellip; <a href=\"https:\/\/www.cdbackslash.com\/?p=158\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;How To: Resolving a System Hang During Patching, Remotely!&#8221;<\/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":[1],"tags":[],"class_list":["post-158","post","type-post","status-publish","format-standard","hentry","category-stuff"],"_links":{"self":[{"href":"https:\/\/www.cdbackslash.com\/index.php?rest_route=\/wp\/v2\/posts\/158","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.cdbackslash.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.cdbackslash.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.cdbackslash.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.cdbackslash.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=158"}],"version-history":[{"count":0,"href":"https:\/\/www.cdbackslash.com\/index.php?rest_route=\/wp\/v2\/posts\/158\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.cdbackslash.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=158"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.cdbackslash.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=158"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.cdbackslash.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=158"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}