So in addition to the .NET Framework 4.6, it turns out that 4.7 will also cause the same issue. You can utilize this script to remove them both to proceed with installation:
function UninstallKB($kbNumber)
{
$setup = Start-Process -FilePath "wusa" -ArgumentList "/uninstall /kb:$kbNumber /quiet" -Wait -PassThru
if ($setup.ExitCode -eq 0) {
Restart-Computer;
}
}
function CheckForKB($kbNumber)
{
$list = wmic qfe list
foreach($line in $list)
{
if ($line.contains($kbNumber))
{
UninstallKB $kbNumber;
Restart-Computer;
}
}
}
#output .net frameworks…
ls -r ‘HKLM:\software\microsoft\NET Framework Setup\NDP\v*’ | foreach { $_.getValue(‘Version’) } | sort -unique
CheckForKB “3102467”; #.net 4.6
CheckForKB “3186539”; #.net 4.7