I'm attempting to find all hotfixes declared in the $unhotfix array, then uninstall each if found.
$unhotfix ="KB2966826","KB2966827","KB2966828"
Get-Hotfix | ? (HotFixId -match $unhotfix) | `
${wusa.exe /uninstall /kb:$_.HotfixId /norestart /log} | wait-process
Using the following works for comparing one value:
Get-Hotfix | ? (HotFixId -match "KB2966826") | select HotFixId
However, I am missing something about matching arrays
Get-Hotfix | ? (HotFixId -match $unhotfixid) | select HotFixId
Gives no results.