diff --git a/lib/core/installer/tools/SetUpdatingIMC.psm1 b/lib/core/installer/tools/SetUpdatingIMC.psm1 index 76ae3e9..4bcbbbb 100644 --- a/lib/core/installer/tools/SetUpdatingIMC.psm1 +++ b/lib/core/installer/tools/SetUpdatingIMC.psm1 @@ -8,7 +8,9 @@ function Set-IcingaForWindowsManagementConsoleUpdating() $UpdateFile = Join-Path -Path (Get-IcingaCacheDir) -ChildPath 'framework.update'; if ($Completed) { - Remove-ItemSecure -Path $UpdateFile -Force -Retries 5 | Out-Null; + if (Test-IcingaForWindowsManagementConsoleUpdating) { + Remove-ItemSecure -Path $UpdateFile -Force -Retries 5 | Out-Null; + } } else { New-Item -Path $UpdateFile -ItemType File -Force | Out-Null; }