Install all available SCCM updates and reboot remote Windows machines

Ever needed to install every patch available in SCCM to multiple Windows machines, but have no SCCM access to push installs?

I found this excellent script made by Eswar Koneti:

https://gallery.technet.microsoft.com/SCCM-Configmgr-Powershell-ebbb2c0e
http://eskonr.com/2016/11/sccm-configmgr-powershell-script-to-install-software-updates-on-remote-clients/

It reads the clients.txt file for a list of hostnames / IPS, connects to each one remotely and installs everything avaible in SCCM.

I also made an additional tool in order to automatically reboot all machines that are included in clients.txt.

With both scripts you can push all security updates to your windows machines and then reboot them.

Running:

*Edit clients.txt and put in the list of machines you would like to update and reboot. Either hostnames or IPs work.
*Open a powershell prompt:
*Set execution policy to allow for the execution of un-signed scripts.
*Type “y” and press enter

Set-ExecutionPolicy -scope Process -ExecutionPolicy Bypass

*Now run the SCCM update script

.\install_all_updates_in_sccm.ps1

*Eswar’s script will create a InstallUpdates.log, check for errors.
*Wait a few minutes for updates to install and then run the reboot all script, type “yes” to continue.

.\reboot_all_machines.ps1

*My script will create a reboot.log, check for errors.

Download here: sccm_all_updates_and_reboot.zip