diff --git a/lib/core/framework/Install-IcingaFrameworkComponent.psm1 b/lib/core/framework/Install-IcingaFrameworkComponent.psm1 index 595cc37c..680c9fb1 100644 --- a/lib/core/framework/Install-IcingaFrameworkComponent.psm1 +++ b/lib/core/framework/Install-IcingaFrameworkComponent.psm1 @@ -112,7 +112,7 @@ function Install-IcingaFrameworkComponent() if ([string]::IsNullOrEmpty((Get-IcingaJEAContext)) -eq $FALSE) { Write-IcingaConsoleNotice 'Updating Icinga JEA profile'; - Invoke-IcingaCommand { Install-IcingaJEAProfile; }; + Invoke-IcingaCommand -ScriptBlock { Install-IcingaJEAProfile; } | Out-Null; } # Unload the module if it was loaded before diff --git a/lib/core/framework/Install-IcingaFrameworkUpdate.psm1 b/lib/core/framework/Install-IcingaFrameworkUpdate.psm1 index 29f38265..19a6aba4 100644 --- a/lib/core/framework/Install-IcingaFrameworkUpdate.psm1 +++ b/lib/core/framework/Install-IcingaFrameworkUpdate.psm1 @@ -109,7 +109,7 @@ function Install-IcingaFrameworkUpdate() if ([string]::IsNullOrEmpty((Get-IcingaJEAContext)) -eq $FALSE) { Remove-IcingaFrameworkDependencyFile; Write-IcingaConsoleNotice 'Updating Icinga JEA profile'; - Invoke-IcingaCommand { Install-IcingaJEAProfile; }; + Invoke-IcingaCommand -ScriptBlock { Install-IcingaJEAProfile; } | Out-Null; } Write-IcingaConsoleNotice 'Framework update has been completed. Please start a new PowerShell instance now to complete the update'; diff --git a/lib/core/framework/Restart-IcingaService.psm1 b/lib/core/framework/Restart-IcingaService.psm1 index 2bcee162..2fc6d7bf 100644 --- a/lib/core/framework/Restart-IcingaService.psm1 +++ b/lib/core/framework/Restart-IcingaService.psm1 @@ -35,7 +35,7 @@ function Restart-IcingaService() } catch { Write-IcingaConsoleError -Message 'Failed to restart service "{0}". Error: {1}' -Objects $IcingaShellArgs[0], $_.Exception.Message; } - } + } | Out-Null; } else { Write-IcingaConsoleWarning -Message 'The service "{0}" is not installed' -Objects $Service; } diff --git a/lib/core/framework/Start-IcingaService.psm1 b/lib/core/framework/Start-IcingaService.psm1 index e0628fd3..afcb928e 100644 --- a/lib/core/framework/Start-IcingaService.psm1 +++ b/lib/core/framework/Start-IcingaService.psm1 @@ -35,7 +35,7 @@ function Start-IcingaService() } catch { Write-IcingaConsoleError -Message 'Failed to start service "{0}". Error: {1}' -Objects $IcingaShellArgs[0], $_.Exception.Message; } - } + } | Out-Null; } else { Write-IcingaConsoleWarning -Message 'The service "{0}" is not installed' -Objects $Service; } diff --git a/lib/core/framework/Stop-IcingaService.psm1 b/lib/core/framework/Stop-IcingaService.psm1 index 5c008572..293d2cbc 100644 --- a/lib/core/framework/Stop-IcingaService.psm1 +++ b/lib/core/framework/Stop-IcingaService.psm1 @@ -35,7 +35,7 @@ function Stop-IcingaService() } catch { Write-IcingaConsoleError -Message 'Failed to stop service "{0}". Error: {1}' -Objects $IcingaShellArgs[0], $_.Exception.Message; } - } + } | Out-Null; } else { Write-IcingaConsoleWarning -Message 'The service "{0}" is not installed' -Objects $Service; }