{"id":2792,"date":"2015-06-23T21:56:02","date_gmt":"2015-06-23T19:56:02","guid":{"rendered":"http:\/\/michlstechblog.info\/blog\/?p=2792"},"modified":"2015-12-10T07:17:23","modified_gmt":"2015-12-10T06:17:23","slug":"windows-script-to-uninstall-all-hotfixes-and-updates","status":"publish","type":"post","link":"https:\/\/michlstechblog.info\/blog\/windows-script-to-uninstall-all-hotfixes-and-updates\/","title":{"rendered":"Windows: Script to uninstall all Hotfixes and Updates"},"content":{"rendered":"<div class=\"twoclick_social_bookmarks_post_2792 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_2792')){$('.twoclick_social_bookmarks_post_2792').socialSharePrivacy({\"services\":{\"flattr\":{\"uid\":\"Michl\",\"status\":\"on\",\"the_title\":\"Windows%3A%20Script%20to%20uninstall%20all%20Hotfixes%20and%20Updates\",\"the_excerpt\":\"Hi%2C%0D%0A%0D%0Ahere%20is%20a%20%22oneliner%22%20to%20uninstall%20all%20Windows%20Update%20at%20once.%20They%20were%20deinstalled%20in%20order%20from%20the%20highest%20to%20the%20lowest%20KB%20Number%20which%20increases%20speed%20of%20the%20remove%20process%28Latest%20fix%20first%29.%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-script-to-uninstall-all-hotfixes-and-updates\\\/\",\"post_id\":2792,\"post_title_referrer_track\":\"Windows%3A+Script+to+uninstall+all+Hotfixes+and+Updates\",\"display_infobox\":\"on\"});}});\n\/* ]]> *\/<\/script><\/div><p>Hi,<\/p>\n<p>here is a &#8220;oneliner&#8221; to uninstall all Windows Update at once. They were deinstalled in order from the highest to the lowest KB Number which increases speed of the remove process(Latest fix first).<br \/>\n<!--more--><\/p>\n<pre class=\"brush: powershell; title: ; notranslate\" title=\"\">\r\nPS C:\\&gt;  Get-WmiObject -query &quot;Select HotFixID  from Win32_QuickFixengineering&quot; | sort-object -Descending -Property HotFixID|%{\r\n\t$sUpdate=$_.HotFixID.Replace(&quot;KB&quot;,&quot;&quot;)\r\n \twrite-host (&quot;Uninstalling update &quot;+$sUpdate);\r\n\t&amp; wusa.exe \/uninstall \/KB:$sUpdate \/quiet \/norestart;\r\n\t# while((Get-Process &quot;wusa&quot; -ErrorAction SilentlyContinue).Count -ge 1){start-sleep 1}\r\n        # Waiting until an existing Hotfix installation finish. Improved by Paul T\r\n        Wait-Process wusa\r\n        Start-Sleep -s 1\r\n}\r\n<\/pre>\n<p>And extended to deinstall a defined number of fixes <\/p>\n<pre class=\"brush: powershell; title: ; notranslate\" title=\"\">\r\n$iFixCount=20\r\nGet-WmiObject -query &quot;Select HotFixID  from Win32_QuickFixengineering&quot; | sort-object -Descending -Property HotFixID|%{\r\n\t$sUpdate=$_.HotFixID.Replace(&quot;KB&quot;,&quot;&quot;)\r\n \twrite-host (&quot;Uninstalling update &quot;+$sUpdate);\r\n\t&amp; wusa.exe \/uninstall \/KB:$sUpdate \/quiet \/norestart;\r\n\t# while((Get-Process &quot;wusa&quot; -ErrorAction SilentlyContinue).Count -ge 1){start-sleep 1}\r\n        # Waiting until an existing Hotfix installation finish. Improved by Paul T\r\n        Wait-Process wusa\r\n        Start-Sleep -s 1\r\n\t$iFixCount--\r\n\tif($iFixCount -le 0){\r\n\t\tbreak\r\n\t}\r\n }\r\nshutdown \/t 0 \/r \/f\r\n<\/pre>\n<p>Have fun<\/p>\n<p>Michael<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Hi, here is a &#8220;oneliner&#8221; to uninstall all Windows Update at once. They were deinstalled in order from the highest to the lowest KB Number which increases speed of the remove process(Latest fix first).<\/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,4],"tags":[676,677,133,678,668,679,20],"class_list":["post-2792","post","type-post","status-publish","format-standard","hentry","category-powershell-scripting","category-windowsknowhow","category-windowsscripts","tag-all-updates","tag-deinstall","tag-powershell","tag-remove","tag-uninstall","tag-win32_quickfixengineering","tag-windows-2"],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/posts\/2792","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=2792"}],"version-history":[{"count":14,"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/posts\/2792\/revisions"}],"predecessor-version":[{"id":3349,"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/posts\/2792\/revisions\/3349"}],"wp:attachment":[{"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/media?parent=2792"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/categories?post=2792"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/tags?post=2792"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}