Posts

Showing posts from April, 2017

Yet another Auto-Update script...

NOTE: Updates are now being posted here:  https://www.powershellgallery.com Here again is my take on automatic updating.  We have a guy that handles patching via a 3rd party tool (Kaspersky).  I don't like him touching my domain controllers so I used a number of scripts I found to distill down to the script below. Kaspersky uses a network agent to keep the settings uniform and that causes issues when you want to use the Microsoft update site.  This script is designed to stop this agent temporarily and allow normal patching to occur. It requires the NuGet and PSWindowsUpdate modules but will auto-load them if needed.  It also requires PowerShell v5. To simplify the entire process I decided that the script should run twice, once Saturday night to apply patches, then again Sunday morning to verify what was done.  The verification sends and html coded report  to whoever you chose.  It also creates a .CVS log file and only keeps the last 10 to ...