Remember to maintain security and privacy. Do not share sensitive information. Procedimento.com.br may make mistakes. Verify important information. Termo de Responsabilidade

How to Remove Windows Updates Using PowerShell

In the Windows environment, managing updates is crucial for maintaining system security and performance. However, there are instances where a specific update might cause issues, and you may need to remove it. While Windows does not have a direct "Remove-WindowsUpdate" cmdlet, you can achieve the same goal using PowerShell commands. This article will guide you through the process of identifying and removing problematic Windows updates using PowerShell.


Examples:


Step 1: List Installed Updates


First, you need to identify the update you want to remove. You can list all installed updates using the Get-HotFix cmdlet in PowerShell.


Get-HotFix

This command will display a list of installed updates along with their KB (Knowledge Base) numbers.


Step 2: Identify the Update to Remove


Once you have the list of updates, identify the KB number of the update you wish to remove. For example, let's say you want to remove the update with the KB number KB5001330.


Step 3: Remove the Update


To remove an update, you can use the wusa.exe utility with the /uninstall switch. Here’s how you can do it via PowerShell:


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


  • /uninstall: Specifies that you want to uninstall the update.

  • /kb:5001330: Specifies the KB number of the update.

  • /quiet: Runs the uninstallation without user interaction.

  • /norestart: Prevents the system from restarting automatically.


Step 4: Verify the Removal


After running the uninstallation command, you can verify that the update has been removed by listing the installed updates again:


Get-HotFix

Check to ensure that the KB number of the removed update no longer appears in the list.


Additional Tips



  • Always create a system restore point before removing updates to ensure you can revert changes if needed.

  • Ensure that you have administrative privileges to run these commands.


To share Download PDF

Gostou do artigo? Deixe sua avaliação!
Sua opinião é muito importante para nós. Clique em um dos botões abaixo para nos dizer o que achou deste conteúdo.