Test-MSUpdates question

Topics: Archive - General
Feb 11, 2015 at 8:29 PM
so I have been looking to install updates OK RSAT [Windows6.1-KB958830-x64-RefreshPkg.msu] and the install-msupdates command should work.

Its not and I think that is because in the PSADT version 3.2.0 that we use the line below will always detect the files as installed. no clue why other thatn maybe a mismatch in the -match portion of the function.

This original line causes my script to fail, every time.
$Searcher.QueryHistory(0, $updateCount) | Where-Object { $_.Title -match $kbNumber } | ForEach-Object { $kbFound = $true }

if I change the line to:
$Searcher.QueryHistory(0, $updateCount) | Where-Object { $_.HotfixId -match $kbNumber } | ForEach-Object { $kbFound = $true }

it works, every time.

Now would this break anything else? Has this been addressed in 3.5.0? Am I the only one with this issue?

Using the native get-hotfix I was able to confirm that rsat was not installed. and that the original line caused a fail and the updated line worked correctly.

I tried this with the CM12 CU3 msp file and while it shows under installed updates it does not show up when you run get-hotfix so sadly it will not work using the install-MSUpdates route. Which is a total bummer!