PowerShell find Remove Windows patch files

Source: Internet
Author: User
This morning received an email notice from the head office, to the effect that the latest March Windows patch files kb4088875 will cause VMware under the Windows 7 and Windows R2 lost IP address, look to everyone's attention.

Beans are generally patched with the WSUS server, and the frequency is more positive. On the WSUS look, this security patch has been default approve, quickly decline off.

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

Search through PowerShell to see which machines are 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 result is as follows, fortunately, several units

Removing patches is also easy, execute the following remote command

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

Re-scan okay successfully deleted

PowerShell find Remove Windows patch files

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.