Check for the missing hot patches for wanna cry

Hi, all a good script that I found to check to see if any hosts are missing critical patches for the wanna cry.

 

# HotFixes containing the patch
$hotfixes = “KB4012212”, “KB4019215”, “KB4012217”, “KB4012218”,  “KB4015551”, “KB4015552”,  “KB4019216”, “KB4012216”, “KB4015549”, “KB4015550”, “KB4013429”, “KB4019472”, “KB4015217”, “KB4015438”, “KB4016635”, “KB4019264”

$listofvms = Read-Host ” Full path to VM txt file – (i.e. C:\evin\VMS.TXT)”
$guests =  get-content $listofvms

foreach ($guest in $guests) {

# Search for the HotFixes
$hotfix = Get-HotFix -ComputerName $guest | Where-Object {$hotfixes -contains $_.HotfixID} | Select-Object -property “HotFixID”

write-host -foregroundcolor yellow $guest $hotfix}

Wana_Decrypt0r_screenshot.png

 

Source: https://en.wikipedia.org/wiki/WannaCry_ransomware_attack

 

Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s