diff --git a/lib/core/icingaagent/installer/Install-IcingaAgent.psm1 b/lib/core/icingaagent/installer/Install-IcingaAgent.psm1 index 44eac5f..cd5d004 100644 --- a/lib/core/icingaagent/installer/Install-IcingaAgent.psm1 +++ b/lib/core/icingaagent/installer/Install-IcingaAgent.psm1 @@ -12,6 +12,11 @@ function Install-IcingaAgent() $IcingaInstaller = Get-IcingaAgentMSIPackage -Source $Source -Version $Version -SkipDownload; $InstallTarget = $IcingaData.RootDir; + if ([string]::IsNullOrEmpty($Version)) { + Write-Host 'No Icinga Agent version specified. Skipping installation.'; + return $FALSE; + } + if ($IcingaData.Installed -eq $TRUE -and $AllowUpdates -eq $FALSE) { Write-Host 'The Icinga Agent is already installed on this system. To perform updates or downgrades, please add the "-AllowUpdates" argument'; return $FALSE;