Are alle necessary updates in place

When you are setting up servers and installing Server software you will often discover that you are missing certain KB updates that are requirements for the software. Often will this be related to that server are patch from a strict security related point of view, so new "features", will not be pushed out by SCCM or other similar tools. Sadly with this strategy important optimization and stability upgrades as well as necessary updates for application installation are missing.


To run a quick check for a series of update you can create a csv files with the number of necessary KB and compare it with installed updates on the server, instead of manually checking an often long install log on the server.

My script are using the filename and location "C:\Temp\fasit.csv" as the list of necessary files.


Text format:
--------------------------------------------------------------------------------------
$Header = "KB"
$Fasit = Import-Csv -Path "C:\Temp\fasit.csv" -Header $Header
Install-Module PSWindowsUpdate -force
$Installed = Get-WuHistory | select KB

function CompareLists
{
    [CmdletBinding()]
    Param(
        [System.Array]$Fasit,
        [System.Array]$Installed
    )

    $Fasit | foreach {
        if ($Installed -notcontains $_) {
            Write-Host "Could not find KB: " $_
        }
    }
}


$Fasit = $Fasit | foreach { $_.KB }

CompareLists -Fasit $Fasit -Installed $Installed

--------------------------------------------------------------------------------------

Popular posts from this blog

Installing Android on a Hyper-V virtual machine

Quick guide on how to run BgInfo background as Group Policy login

MDT: TimeZoneName and index number list