diff --git a/lib/core/icingaagent/getters/Get-IcingaAgentMSIPackage.psm1 b/lib/core/icingaagent/getters/Get-IcingaAgentMSIPackage.psm1 index f4b9ed5..5a48b7d 100644 --- a/lib/core/icingaagent/getters/Get-IcingaAgentMSIPackage.psm1 +++ b/lib/core/icingaagent/getters/Get-IcingaAgentMSIPackage.psm1 @@ -62,7 +62,7 @@ function Get-IcingaAgentMSIPackage() if ($SkipDownload -eq $FALSE) { $DownloadPath = Join-Path $Env:TEMP -ChildPath $UsePackage; Write-Host ([string]::Format('Downloading Icinga 2 Agent installer "{0}" into temp directory "{1}"', $UsePackage, $DownloadPath)); - Invoke-WebRequest -Uri ([string]::Format('{0}/{1}', $Source, $UsePackage)) -OutFile $DownloadPath; + Invoke-WebRequest -Uri (Join-WebPath -Path $Source -ChildPath $UsePackage) -OutFile $DownloadPath; } return @{