I have been a linux admin for the last decade or so and haven’t used windows much. Now I wan’t to automate windows updates as I have done them on linux.
If you know anything about linux I use ubuntu as my main operating system. So if you know about debian/ubuntu linux I’m trying to do this in windows: sudo apt-get update && sudo apt-get -y upgrade && sudo reboot.
As you can imagine this is a littler harder in windows and only works with windows 8 and up. It starts with using modules in powershell. I heard in a more recent version of powershell you won’t have to download this module anymore.
For now its built into the script and you agree to their terms: https://gallery.technet.microsoft.com/scriptcenter/2d191bcd-3308-4edd-9de2-88dff796b0bc
So this is what I wrote in powershell. Use at your own RISK :) The server won’t reboot if there are no updates.