Get the App
SLTechnology News&Howtos  ›  Servers  › 

PowerShell finds and deletes Windows patch files

Shulou Source: shulou.com Published: 2022-06-03 02:49:10 10月02日 Update

I received an email notice from the head office this morning, to the effect that the latest March Windows patch file kb4088875 will cause Windows 7 and Windows 2008 R2 under Vmware to lose their IP address.

Beans generally use WSUS servers to patch, and the frequency is more active. As soon as you go to WSUS, you can see that this security patch already defaults to Approve, so decline it quickly.

Because this patch has been out for 2 weeks, it is estimated that some servers have been patched, and these installed patches will not be deleted automatically. Although I have banned installation on wsus, this setting only works for servers that are not installed and needs to be removed manually for those that have already been installed.

Search with Powershell to see which machines have been installed.

$a=Get-ADComputer-Filter {operatingsystem-like "* 2008 R2*"} | select name$b=invoke-command-ComputerName $a.name-script {Get-Hotfix | where {$_ .HotFixId-like "KB4088875"}}-ErrorAction SilentlyContinue

The results are as follows, fortunately, only a few.

It is also easy to remove the patch, execute the following remote command

Invoke-command-ComputerName $b.pscomputername-script {Start-Process wusa.exe-ArgumentList'/ KB:4088875 / uninstall / quiet / norestart'-Wait}

Rescan okay deleted successfully

Tags: Patches servers services files security success functions commands addresses carelessness security patches head office manual monthly machine results beans notices mail noodles Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Xiaomi Shulou Tech Info Docker NVidia Huawei