SCCM – PowerShell to Check Windows Updates and Install Them on Computer

Here are two PowerShell scripts  that checks what updates have been delivered to a computer via SCCM and invokes the installation of them.
Why do you ask? Well I build servers and need to make sure all windows updates (to an approved released are installed on the newly build computer).
This can take a while for SCCM client to get its act together and download them. These two scripts allow me to easily check the status of a computer and initiate the installation remotely.

Get-UpdatesAvailableOnServer.ps1 lists the updates ready for installation

Invoke-UpdatesAvailableOnServer.ps1 lists the updates ready for installation AND kicks off the installation process

Source for these was based on https://gallery.technet.microsoft.com/scriptcenter/Install-All-Missing-8ffbd525
I just split it out into just a read, then an invoke.
Also enabled it to be run against a remote computer.

3 thoughts on “SCCM – PowerShell to Check Windows Updates and Install Them on Computer

  1. Thank you for the script, that is the only script to check pending updates that works for me “out of the box”.

  2. Awesome script!!! Thank you for sharing. I have been playing around with taking what you’ve done above and update it to grab an update status from a list of servers using the get-content command. Once done, I also want to push those updates out to that same list of servers but so far, I haven’t had much luck as of yet. Would you have any suggestions or have you done something like this already? Thank you again in advance…

Leave a comment

Your email address will not be published. Required fields are marked *