Kill GWX process doesn't ask for confirmation anymore

This commit is contained in:
Yorick Barbanneau 2016-01-21 15:01:01 +01:00
parent 5f34204189
commit 7c828e85e8

View file

@ -39,9 +39,9 @@ function hide_update() {
if (!$found){ Write-Host -ForegroundColor Red "Not found"} if (!$found){ Write-Host -ForegroundColor Red "Not found"}
} }
} }
if (stop-process -name GWX -ErrorAction SilentlyContinue) { if (stop-process -name GWX -Force -ErrorAction SilentlyContinue) {
Write-Output "Killed GWX ..." Write-Host "GWX process stopped ..."
} }
Foreach($kbID in $kbIDs){ Foreach($kbID in $kbIDs){
$kbNum = $kbID.Replace("KB","") $kbNum = $kbID.Replace("KB","")