mirror of
https://github.com/Icinga/icinga-powershell-framework.git
synced 2026-02-03 04:09:29 -05:00
17 lines
514 B
PowerShell
17 lines
514 B
PowerShell
function Set-IcingaForWindowsManagementConsoleUpdating()
|
|
{
|
|
param (
|
|
[switch]$Completed = $FALSE
|
|
);
|
|
|
|
Set-IcingaForWindowsManagementConsoleClosing;
|
|
|
|
$UpdateFile = Join-Path -Path (Get-IcingaCacheDir) -ChildPath 'framework.update';
|
|
if ($Completed) {
|
|
if (Test-IcingaForWindowsManagementConsoleUpdating) {
|
|
Remove-ItemSecure -Path $UpdateFile -Force -Retries 5 | Out-Null;
|
|
}
|
|
} else {
|
|
New-Item -Path $UpdateFile -ItemType File -Force | Out-Null;
|
|
}
|
|
}
|