From 5f131708983726b701879285a60d5188c5f475a7 Mon Sep 17 00:00:00 2001 From: Yorick Date: Wed, 16 Mar 2016 14:41:21 +0100 Subject: [PATCH] Redirect locking icals output to Out-Null --- remove-kb.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/remove-kb.ps1 b/remove-kb.ps1 index 7a0763e..b38607f 100755 --- a/remove-kb.ps1 +++ b/remove-kb.ps1 @@ -102,7 +102,7 @@ function lock_dir { Try{ Remove-Item $dir\* -Force -Recurse -ErrorAction SilentlyContinue} Catch {Write-Host -ForegroundColor Red "Some files can't be deleted."} #lock GWX directory - icacls "$dir" /deny *S-1-1-0:`(CI`)`(OI`)F + icacls "$dir" /deny *S-1-1-0:`(CI`)`(OI`)F 2>&1 | Out-Null } Write-Host -Nonewline -ForegroundColor white "Searching for GWX process ... "