diff --git a/lib/core/icingaagent/getters/Get-IcingaAgentBinary.psm1 b/lib/core/icingaagent/getters/Get-IcingaAgentBinary.psm1 index 4c4853f..f1fb417 100644 --- a/lib/core/icingaagent/getters/Get-IcingaAgentBinary.psm1 +++ b/lib/core/icingaagent/getters/Get-IcingaAgentBinary.psm1 @@ -1,6 +1,10 @@ function Get-IcingaAgentBinary() { $IcingaRootDir = Get-IcingaAgentRootDirectory; + if ([string]::IsNullOrEmpty($IcingaRootDir)) { + throw 'The Icinga Agent seems not to be installed'; + } + $IcingaBinary = (Join-Path -Path $IcingaRootDir -ChildPath '\sbin\icinga2.exe'); if ((Test-Path $IcingaBinary) -eq $FALSE) {