{"id":4056,"date":"2019-04-26T01:32:44","date_gmt":"2019-04-26T01:32:44","guid":{"rendered":"https:\/\/pariswells.com\/blog\/?p=4056"},"modified":"2021-12-09T23:23:20","modified_gmt":"2021-12-09T23:23:20","slug":"issue-with-highcpu-for-server-2012-due-to-windows-update","status":"publish","type":"post","link":"https:\/\/pariswells.com\/blog\/random\/issue-with-highcpu-for-server-2012-due-to-windows-update","title":{"rendered":"Issue with HighCPU for Server 2012 due to Windows Update"},"content":{"rendered":"<p>Recently at a site we had machines starting using high CPU of the SVCHost process, this process is used by lots of services to access the network , however, as soon as stopping the Windows Update Service CPU came back down to normal<\/p><p>I had seen this before at another site and the issue was due to not enough CPU ( only one was flatlining the CPU )\u00a0 , however increasing the CPU and memory still did not fix this<\/p><p>Then after some recent updates, the servers would no Windows Update anymore , they would just sit on &#8220;Checking for Windows Updates&#8221;. I couldn&#8217;t install updates Via powershell\u00a0<\/p><p>A server running Windows Server 2012 R2 on the same network updated fine!<\/p><p>I tried the normal fix of Wiping these :\u00a0<\/p><p><strong>C:\\Windows\\SoftwareDistribution<\/strong><\/p><p><strong>HKEY_LOCAL_MACHINE\\SOFTWARE\\Policies\\Microsoft\\Windows\\WindowsUpdate<\/strong><\/p><p><strong>HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\WindowsUpdate<\/strong><\/p><p>However to no avail.<\/p><p>&nbsp;<\/p><p>I checked the Windows Update Log : C:\\Windows\\WindowsUpdate.log<\/p><p>2019-04-23 14:09:51:839 5080 ab8 CltUI FATAL: CNetworkCostChangeHandler::RegisterForCostChangeNotifications: CoCreateInstance failed with error 80004002<br \/>2019-04-23 14:09:51:839 5080 ab8 CltUI WARNING: RegisterNetworkCostChangeNotification: Error 80004002<\/p><p>&nbsp;<\/p><p>I then found an article to Remove the Desktop Experience Feature ( which had been installed to Disk Cleanup the servers )\u00a0<\/p><p><br \/>After this I did this again and could windows update again<\/p><p><strong>C:\\Windows\\SoftwareDistribution<\/strong><\/p><p><strong>HKEY_LOCAL_MACHINE\\SOFTWARE\\Policies\\Microsoft\\Windows\\WindowsUpdate<\/strong><\/p><p><strong>HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\WindowsUpdate<\/strong><\/p><p>&nbsp;<\/p><p>Check also for Dual Scanning<\/p><p>&nbsp;<\/p><p class=\"x_MsoNormal\">In an elevated powershell prompt:<\/p><p class=\"x_MsoNormal\" aria-hidden=\"true\">\u00a0<\/p><ul type=\"disc\"><li class=\"x_MsoListParagraph\"><b>Get-WindowsUpdateLog<\/b><br aria-hidden=\"true\" \/><i>This will produce a log file on the desktop giving verbose detail on all of the windows update tasks performed recently.<br aria-hidden=\"true\" \/><br aria-hidden=\"true\" \/><\/i><\/li><li class=\"x_MsoListParagraph\"><b>(New-Object -ComObject &#8220;Microsoft.Update.ServiceManager&#8221;).Services | Select-Object Name, IsDefaultAUService<\/b><br aria-hidden=\"true\" \/><i>This will output all configured update sources, along with the default.<br aria-hidden=\"true\" \/>If dual scanning is active, and the workstation is not checking in with WSUS, you might see Windows Update as the default, and WSUS as not default.<br aria-hidden=\"true\" \/><br aria-hidden=\"true\" \/><\/i><\/li><li class=\"x_MsoListParagraph\"><b>(New-Object -ComObject Microsoft.Update.AutoUpdate).DetectNow()<\/b><br aria-hidden=\"true\" \/><i>This will trigger the computer to check in with the WSUS server \u2013 BUT if there are no new reports to add, it won\u2019t send anything. If that is the case, then:<br aria-hidden=\"true\" \/><br aria-hidden=\"true\" \/><\/i><\/li><li class=\"x_MsoListParagraph\"><b>$updateSession = new-object -com &#8220;Microsoft.Update.Session&#8221;; $updates=$updateSession.CreateupdateSearcher().Search($criteria).Updates<\/b><br aria-hidden=\"true\" \/><i>This will force a status to be returned at next check in<\/i><\/li><\/ul><p class=\"x_MsoNormal\" aria-hidden=\"true\">\u00a0<\/p><p class=\"x_MsoNormal\"><br aria-hidden=\"true\" \/>Extra GPO settings to prevent Dual Scanning from hijacking the GPO and making the workstations go rogue \u2013 take note of setting the alternate download server to your WSUS server:<\/p><p><b><i>**Computer Configuration &gt; Policies &gt; Administrative Templates &gt; System &gt; Device Installation<\/i><\/b><\/p><p><b>Specify the search server for device driver source locations<\/b><\/p><p>Set to &#8220;Enabled&#8221;<br aria-hidden=\"true\" \/>Select search order: &#8220;Do not search Windows Update&#8221;<\/p><p><strong>Specify the search server for device driver updates<\/strong><\/p><p>Set to &#8220;Enabled&#8221;<br aria-hidden=\"true\" \/>Select Update Server: &#8220;Search Managed Server&#8221;<\/p><p><strong><i>Computer Configuration &gt; Policies &gt; Administrative Templates &gt; System &gt; Internet Communication Management &gt; Internet Communication Settings<\/i><\/strong><i><\/i><\/p><p><strong>Turn off access to all Windows Update features<\/strong>\u00a0(In Microsoftspeak that means their online server, not &#8216;make so it can&#8217;t get updates&#8217;)<\/p><p>Set to &#8220;Enabled&#8221;<\/p><p><strong>Turn off access to the Store<\/strong><\/p><p>Set to &#8220;Enabled&#8221;<\/p><p><strong><i>Computer Configuration &gt; Policies &gt; Administrative Templates &gt; Windows Components &gt; Windows Update<\/i><\/strong><i><\/i><\/p><p><strong>Do not allow update deferral policies to cause scans against Windows Update<\/strong><\/p><p>Set to &#8220;Enabled&#8221;<\/p><p><strong>No auto-restart with logged on users for scheduled automatic updates installations<\/strong><\/p><p>Set to &#8220;Enabled&#8221;<\/p><p><strong>Specify intranet Microsoft update service location (<i>note that the alternate download server is also set to our own WSUS server<\/i>)<\/strong><\/p><p>Set to &#8220;Enabled&#8221;<br aria-hidden=\"true\" \/>Set the intranet update service for detecting updates: [http:\/\/[YOUR%20SERVER]:8530]http:\/\/[YOUR SERVER]:8530<br aria-hidden=\"true\" \/>Set the intranet statistics server:[http:\/\/[YOUR%20SERVER]:8530]http:\/\/[YOUR SERVER]:8530<br aria-hidden=\"true\" \/>Set the alternate download server: [http:\/\/[YOUR%20SERVER]:8530]http:\/\/[YOUR SERVER]:8530<br aria-hidden=\"true\" \/>Uncheck the box Download files with no Url in the metadata if alternate download server is set<\/p><p class=\"x_MsoNormal\" aria-hidden=\"true\">\u00a0<\/p><p>&nbsp;<\/p>","protected":false},"excerpt":{"rendered":"<p>Recently at a site we had machines starting using high CPU of the SVCHost process, this process is used by lots of services to access the network [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[2932,2933,2930,2934,525,2931,1131,2492,2191,924],"class_list":["post-4056","post","type-post","status-publish","format-standard","hentry","category-random","tag-checking-for-updates","tag-error-80004002","tag-highcpu","tag-registernetworkcostchangenotification","tag-server-2012","tag-svchost","tag-update","tag-windows","tag-windows-update","tag-windowsupdate-log"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/posts\/4056","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/comments?post=4056"}],"version-history":[{"count":2,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/posts\/4056\/revisions"}],"predecessor-version":[{"id":5440,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/posts\/4056\/revisions\/5440"}],"wp:attachment":[{"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/media?parent=4056"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/categories?post=4056"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/tags?post=4056"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}