Get-KbUpdate will return both Windows 2012 and 2012 R2 updates when trying to search for Windows 2012. I have updated the script locally to fix the issue by searching the update with exactly wanted OS. For your reference:
Add '`"' for $OperatingSystem to Get-KbUpdate.ps1 line 232:
Get-KbUpdate will return both Windows 2012 and 2012 R2 updates when trying to search for Windows 2012. I have updated the script locally to fix the issue by searching the update with exactly wanted OS. For your reference: Add '`"' for $OperatingSystem to Get-KbUpdate.ps1 line 232:
$url = "https://www.catalog.update.microsoft.com/Search.aspx?q=$kb+`"$OperatingSystem`""