How to install KB Hotfixes only if they are not installed
3901
post-template-default,single,single-post,postid-3901,single-format-standard,cookies-not-set,ajax_fade,page_not_loaded,,side_area_uncovered_from_content,qode-theme-ver-15.0,qode-theme-bridge,wpb-js-composer js-comp-ver-5.4.7,vc_responsive
 

How to install KB Hotfixes only if they are not installed

How to install KB Hotfixes only if they are not installed

I just wanted to share you a tiny snippet if you’re looking for a simple PowerShell liner to simply get a KB Hotfix installed. It also verifies if the KB is installed already.

$SourceFolder = "C:\Software"
$KB = "KB2999226"

if (-not (Get-Hotfix -Id $KB)) {
	Start-Process -FilePath "wusa.exe" -ArgumentList "$SourceFolder\Windows8.1-KB2999226-x64.msu /quiet /norestart" -Wait
} else {
	Write-Host "$KB already installed."
}

Okay this is a small one for you guys but trust me I will wrap it for you into a big function if you want to use it with more than one server or even Credentials. 

No Comments

Sorry, the comment form is closed at this time.

%d bloggers like this: