Uninstall all windows updates command line

How to Remove Installed Updates in Windows 10 and Windows Server?

Sometimes it happens that the security updates for Microsoft products (released under MS Patch Tuesday) cause problems with the OS or third-party software. The issues caused by the updates can be either mass and occur in a large number of devices or private that occur in some combinations of the Windows OS version and some apps.

If the Windows (or Office) patch causes a problem on the computers of many users, and this is confirmed by Microsoft experts, the update is pulled by the company and after a while is replaced by a new one with the bugs fixed. But if necessary, in Windows there is a way to uninstall any security update or patch.

In this article we’ll show how to properly uninstall updates in Windows OS (the article covers Windows 10, 8.1, 7 and Windows Server 2016, 2012/R2, 2008/R2). These ways of removing updates can be used if you installed the update manually from a CAB or MSU file, your device automatically received it from the Windows Update servers or your WSUS server.

There are several ways to uninstall updates in Windows (Windows Server):

How to Uninstall Windows Updates Using the Control Panel?

Let’s look on how to uninstall updates in Windows 10. Open the menu Settings app and go to the Update & Security -> Windows update -> View Update History -> Uninstall updates.

You can also go to the “Uninstall an update” panel using the classic Control Panel (Control Panel\Programs\Programs and Features) and press the button “View installed updates”.

A list of all Windows and Office updates installed on your device will appear. Find the necessary update in the list (or, to be more precise, unnecessary :)), select it, click the Uninstall button. The uninstall update wizard starts.

Click Yes when prompted if you want to uninstall this update.

And wait till it is uninstalled. After the update is removed, Windows may request a system restart.

How to Prevent (Block) a Specific Update from Installing in Windows 10?

If your computer is configured to automatically receive Windows updates through Windows Update or WSUS, this update will most likely be installed on your computer again. But you can prevent the installation of a specific update by hiding (blocking) it. To do this, use the official tool Microsoft Show or Hide Updates https://support.microsoft.com/en-us/help/3073930/how-to-temporarily-prevent-a-driver-update-from-reinstalling-in-window

Читайте также:  Поменять местами экраны linux

  1. Download and run the wushowhide.diagcab;
  2. Select the option Hide Updates;
  3. Select the update you want to hide and click Next;
  4. After that, this update won’t be installed in Windows automatically via Windows Update. You can remove the hidden update by selecting it in the Show hidden updates.

WUSA.exe: Removing Windows Updates via the Command Line

Windows updates can also be uninstalled from the command prompt. To do it, there is a built-in CLI tool wusa.exe (Windows Update Standalone Installer).

You can list all updates installed on a computer with the command:

wmic qfe list brief /format:table

Using the following command, running as administrator, you can remove the specific update (KB 4100347):

wusa.exe /uninstall /kb:4100347

A user must confirm the removing of the update.

If the update has to be uninstalled in a quiet mode without a user request and notifying about of the subsequent system reboot, the command will look like that:

wusa.exe /quiet /uninstall /kb:4100347 /promptrestart

If you need to suppress the reboot request, use the command:

wusa.exe /quiet /uninstall /kb:4100347 /norestart

You can also remove the update from PowerShell using the PSWindowsUpdate module. The Remove-WindowsUpdate cmdlet is used:

Remove-WindowsUpdate -KBArticleID KB4100347 -NoRestart

The Windows update uninstall event is recorded to the Setup log with the EventID 7 from the WUSA source:

Using PsExec you can uninstall an update on a remote computer, the command is as follows:

psexec.exe \\RemotePCName C:\Windows\System32\wusa.exe /quiet /uninstall /kb:4100347 /warnrestart:600

How to Uninstall a Windows Update using WSUS?

If a corporate WSUS server is used in your company to install updates on a domain computers and servers, you can remove the update approved for install using the Update Services management console. To do it, right-click the Updates branch and then click Search in the menu.

Specify the KB number or a security bulletin you need to find and click Find now. In the list containing the updates that have been found for different Windows versions, select the updates to be uninstalled and click Approve in the menu.

Then select the WSUS Target group you need and choose Approved for Removal in the drop-down list.

In our example, we want to uninstall update on a group of computers named Servers (more about WSUS GPO targeting).

After updating data on the side of WSUS clients (which occurs on a schedule in accordance with the WSUS policy and the synchronization frequency, which is set by the Automatic Update detection frequency, or can be done manually by running wuauclt /detectnow ) , the corresponding update appears with the prefix (Uninstall:) in its name in the Windows Update panel.

After the update has been uninstalled, this event is displayed in Windows Update History.

Removing Windows Update Using the GPO

If you want to remove a specific update on multiple computers of Active Directory domain that doesn’t use WSUS, you can use Startup/Shutdown GPO scripts.

To do it, create a new GPO object linked to the necessary OU, AD site or computer group. Then create a new startup script with the wusa.exe command in the section Computer Configuration -> Policies -> Windows Settings -> Scripts (Startup/Shutdown).

You can also use PowerShell startup scripts to remove installed updates.

Читайте также:  Входа безопасный режим windows 10

How To Uninstall Windows Updates When Computer Is Not Booting?

Sometimes it happens that you cannot remove an update directly from the Windows, since the OS simply not booting after installing the problematic update. In this case, you may have to boot the computer from the rescue or install boot disk and delete the updates via DISM (see the article “Computer Won’t Start After Windows Update”) or using the “Hotfix uninstall” utility from the MSDaRT.

So, we have covered common scenarios of how to uninstall updates on Windows computers.

Как правильно удалять обновления в Windows 10 и Windows Server?

На моей практике уже не раз случалось, что свежие обновления безопасности для продуктов Microsoft, выпускаемые в рамках MS Patch Tuesday, вызывают проблемы в работе операционной системы Windows или стороннего ПО. Проблемы, вызываемые обновлениями, бывают как массовыми, встречающимися у большого количества пользователей, так и частными – встречающимися в редких сочетания определённой версии Windows ОС и некоторых приложений (яркий такой пример проблемы описан здесь).

Если обновление Windows (или Office) вызывает проблему на компьютерах многих пользователей, и это подтверждается специалистами Microsoft, обновление отзывается компанией и через некоторое время заменяется новым, в котором исправляются найденные ошибки. Если обновление Windows вызывает проблемы, пользователь или администратора может самостоятельно удалить уже установленные обновления безопасности.

В этой статье мы рассмотрим, как правильно удалить обновления в ОС Windows (статья относится к Windows 10, 8.1, 7 и Windows Server 2016, 2012/R2, 2008/R2). Данные способы удаления обновлений можно использовать, если вы установили обновление вручную из CAB или MSU файла, автоматически получили его из Интернета с серверов Windows Update или своего сервера WSUS.

Вы можете удалить обновления в Windows (Windows Server) несколькими способами:

Удаляем обновление Windows вручную через Панель управления

Рассмотрим, как удаляются обновления на примере Windows 10. Откройте меню Параметры (Settings) и перейдите в раздел Обновления и Безопасность (Update & Security) -> Центр обновления Windows (Windows update)-> Просмотр журнала обновлений (View Update History) -> Удалить обновления (Uninstall updates).

Также вы можете перейди в окно удаления обновлений через классическую Панель управления: Панель управления -> Программы -> Удаление программ (Control Panel\Programs\Programs and Features) и нажмите на кнопку “Просмотр установленных обновлений” (View installed updates).

В открывшемся окне появится список всех обновлений Windows и Office, установленных в системе. Найдите в списке нужное обновление (а если быть более точным, ненужное 🙂 ), выделите его, нажмите кнопку Удалить (Uninstall). Запуститься мастер удаления обновления.

шт

На вопрос: “вы действительно хотите удалить это обновление?” ответьте Да..

Дождитесь окончания удаления обновления. После завершения сценария удаления обновления, Windows может запросить перезагрузку системы.

Как заблокировать (скрыть) конкретное обновление в Windows 10?

Если ваш компьютер настроены на автоматическое обновление Windows через Windows Update или WSUS это обновление скорее всего опять установится на вашем компьютере. Но вы можете отключить установку конкретного обновления, скрыв его (заблокировав). Для этого нужно использовать официальную утилиту Microsoft Show or Hide Updates (Показывать или скрывать обновления) https://support.microsoft.com/ru-ru/help/3073930/how-to-temporarily-prevent-a-driver-update-from-reinstalling-in-window

  1. Запустите wushowhide.diagcab;
  2. В мастере выберите пункт Hide Updates (скрыть обновления);
  3. Выберите обнволение, которое вы хотите скрыть и нажмите Далее;
  4. После этого данное обновление не будет устанавливаться в Windows через систему автоматических обновлений. Вы можете убрать обновление из скрытых, выбрав его в пункте Show hidden updates (показать скрытые обновления).
Читайте также:  Windows 10 pro x64 by novik

WUSA.exe: Удаление обновлений Windows из командной строки

Обновления Windows можно удалить также и из командной строки. Для этих целей в системе предусмотрена утилита wusa.exe (Windows Update Standalone Installer – автономный установщик обновлений Windows).

Вы можете вывести список всех обновлений, установленных на компьютере, командой:

wmic qfe list brief /format:table

С помощью следующей команды, запущенной с правами администратора, мы удалим обновление KB2790655:
wusa.exe /uninstall /kb:2693643
Пользователь должен подтвердить удаление обновления.

Если обновление нужно удалить в «тихом» режиме без запроса пользователя и предупредить его о последующей перезагрузке системы, команда будет выглядеть так:

wusa.exe /quiet /uninstall /kb:2693643 /promptrestart

Если нужно подавить запрос на перезагрузку, используйте команду:

wusa.exe /quiet /uninstall /kb:2693643 /norestart

Также вы можете удалить обновление из PowerShell с помощью модуля PSWindowsUpdate. Используется командлет Remove-WindowsUpdate формат команды:

Remove-WindowsUpdate -KBArticleID KB2693643 -NoRestart

Событие удаление обновления Windows фиксируется в системном журнале Setup EventID 7 и источником WUSA:

Вы можете удалить обновление на удаленном компьютере с помощью PsExec, используется такой формат команды:

psexec.exe \\remotePK C:\Windows\System32\wusa.exe /quiet /uninstall /kb:2693643/warnrestart:600

Удаление обновлений на всех компьютерах домена через WSUS

Если в вашей комании для установки обновлений на компьютеры домена используется корпоративный сервер WSUS, вы моежет удалить установленные одобренные обновления из консоли управления службы обновлений Update Services. Для этого щелкните ПКМ по ветке Updates и в меню выберите Search.

Укажите номер KB или бюллетеня безопасности, который требуется найти и нажмите Find Now. В списке, содержащем найденные обновления для разных версий Windows, выделите обновления, которые требуется удалить и выберите в меню пункт Approve.

Затем выберите группу компьютеров, которая вас интересует и в выпадающем списке выберите пункт Approved for Removal.

В нашем примере мы хотим удалить обновления на группе компьютеров, с именем Servers.

После процедуры обновления Windows на стороне клиентов WSUS (которая происходит по расписанию в соответствии с политикам WSUS и частотой синхронизации, которая задается параметром Automatic Update detection frequency, либо вы можете запустить цикл синхронизации вручную, набрав wuauclt /detectnow) в панели Windows Update соответствующее обновление появится с префиксом (Uninstall🙂 в названии.

После удаления обновления в журнале Windows Update History появится запись об этом событии.

Удаление обновлений на компьютерах домена с помощью политик GPO

Если вам нужно удалить определенное обновление на множестве компьютеров в домене Active Directory, в котором не используется WSUS, можно воспользоваться функционалом Startup/Shutdown скриптом групповых политик (GPO).

Для этого создайте новый объект GPO, нацеленный на нужную OU / сайт (пример таргетирования групповых политик на сайты AD описан здесь)/ или группу компьютеров. А затем в разделе Computer Configuration -> Policies -> Windows Settings -> Scripts (Startup/Shutdown) создайте новый скрипт с командой wusa из предыдущего раздела.

Также вы можете использовать PowerShell логон скрипты для удаления обновлений.

Как удалить обновление, если Windows не грузится?

Иногда случается, что не удается удалить обновление непосредственно из системы, т.к. Windows просто перестала загружаться после установки проблемного обновления. В этом случае, вероятно, вам придется загрузиться компьютер с загрузочного диска и удалять обновления через DISM (см статью https://winitpro.ru/index.php/2018/01/24/ne-zagruzhaetsya-windows-posle-ustanovki-obnovlenij/), или с помощью утилиты Hotfix uninstall из комплекта MSDaRT.

Итак, мы рассмотрели самые распространенные сценарии удаления обновлений на компьютерах под управлением Windows.

Оцените статью