Build precise queries to find exactly what you need
Press ESC to close
The script does a good job, I’m not quite sure if this is the latest version of the script, but I noted a minor bug and some improvements that could be added.
1. Bug: $critialTitles = “”; should read: $criticalTitles = “”;
The script works anyway despite the error.
2. Putting newlines into update string: $criticalTitles += $update.Title + ” ” Changed to: $criticalTitles += $update.Title + ” `n”
3. These 3 lines are used twice in if statements and ideally would be in a function, just for neatness and brevity.
$updateSession = new-object -com “Microsoft.Update.Session” $updates=$updateSession.CreateupdateSearcher().Search((“IsInstalled=0 and Type=’Software'”)).Updates Export-Clixml -InputObject $updates -Encoding UTF8 -Path $updateCacheFile
Otherwise script works quite nicely.
We’ve completely redesigned the world’s largest repository of Nagios plugins and monitoring tools. Join thousands of users sharing monitoring solutions for servers, applications, and everything in between.
Due to our redesign, all existing accounts require a password reset to access your account again.
Ready to explore 6,100+ projects and contribute to the community?
Reset Password Create Account
Happy Monitoring!