- Access exclusive content
- Connect with peers
- Share your expertise
- Find support resources
12-21-2022 03:37 AM
Did anyone automate Windows Security Patches from Windows so theres "less" manual interaction?
Got some thoughts about it with a scheduled task starting at startup and working with a text file where for example needs to put an attribute=patch-now or something. And on every reboot the task checks that file again and installs on that way all patches with confirmation to wsus.
if anyone has better ideas or already has set something similar set up, i would love to hear it 🙂
12-21-2022 03:41 AM
I haven’t tried it myself but there are these scripts that sound like they may do part of what you are thinking of: https://github.com/Slasky86/CyberArk-Powershell/blob/main/WSUS/readme.md
I would also be interested in what others have come up with.
12-27-2022 12:12 AM
Sounds good to me, need to test it and get back to it, thx!
12-28-2022 01:59 AM
I have slightly modified the provided WSUS scripts to include mail notification as well as logging to the event viewer. Take a look here:
https://github.com/Slasky86/CyberArk-Powershell/tree/main/WSUS
Edit: I see Tim already linked them 🙂 If you have any questions, feel free to reach out
12-28-2022 02:01 AM
And as for auto patching the vault on reboot, I'd maybe create an update procedure that triggers my scripts at a given interval. Thar way you get more control on the update process and if something breaks then you wont have two vaults that are down
02-17-2023 07:03 AM
They work mostly fine. I experience some issues though, sometimes it doesn't report to the wsus properly.
Did you experience the same or is that just our environment? 🙂
With these usually it works better i'll try to add these to your scripts
# Report Windows Update Status to WSUS
CMD.exe /c "wuauclt /reportnow"
CMD.exe /c "wuauclt /detectnow"
Additionally, we have experienced that the servers need multiple reboots so i'll work with an file which the services on reboot checks and then acts if there's still updates. I'll give an update as soon as i got this here tested and up- and running
02-17-2023 07:09 AM
To be honest, I haven't checked the WSUS side of things for reporting. It might be due to the services being shut down before the WSUS is properly updated. If you add those lines in a script, make sure its done before they shut down the services.
If the servers need multiple reboots its usually due to several updates not being installed for quite some time. What you could do is create a separate task that runs the update scripts on startup as well, so if there are any residual updates, those will be installed and any subsequent reboots will be handled right away.
Click Accept as Solution to acknowledge that the answer to your question has been provided.
The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!
These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!
The LIVEcommunity thanks you for your participation!

