From 8f3756e009d03c561f79c7cf704bd16a9bd94280 Mon Sep 17 00:00:00 2001 From: David Yoder Date: Tue, 12 Apr 2022 12:12:25 -0400 Subject: [PATCH] hide error for process not found --- Fix-AteraAgent.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Fix-AteraAgent.ps1 b/Fix-AteraAgent.ps1 index 95ec6ea..034b54c 100644 --- a/Fix-AteraAgent.ps1 +++ b/Fix-AteraAgent.ps1 @@ -3,7 +3,7 @@ $RenameSuffix = "-Old" $FolderNewName = "${FolderToRename}${RenameSuffix}" # Kill processes that can interfere -Get-Process -Name 'reg' | Stop-Process -Force +Get-Process -Name 'reg' -ErrorAction SilentlyContinue | Stop-Process -Force LogMsg "Stopping Atera agent" Stop-Service -Name 'AteraAgent' -Force