From 6a36a8ba5e5a11166acf3c1b0269a2ee98fa7629 Mon Sep 17 00:00:00 2001 From: Lord Hepipud Date: Mon, 3 Aug 2020 19:13:29 +0200 Subject: [PATCH] Fixes type question during Agent installation on Windows 2012 R2 Fixes #90 --- doc/31-Changelog.md | 1 + lib/core/icingaagent/installer/Install-IcingaAgent.psm1 | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/31-Changelog.md b/doc/31-Changelog.md index 068ad36..c0cdb0f 100644 --- a/doc/31-Changelog.md +++ b/doc/31-Changelog.md @@ -29,6 +29,7 @@ Released closed milestones can be found on [GitHub](https://github.com/Icinga/ic * [#84](https://github.com/Icinga/icinga-powershell-framework/issues/84), Fix conversion of `ConvertTo-Seconds` and `ConvertTo-SecondsFromIcingaThresholds` while the input value is `$null` * [#85](https://github.com/Icinga/icinga-powershell-framework/issues/85), Fix incorrect handling to empty service user password which was configured as empty `String` instead of `$null` `SecureString` object * [#89](https://github.com/Icinga/icinga-powershell-framework/issues/89), Fix file type question during `Get-IcingaCheckCommandConfig` generation in Windows 2012 R2 and older +* [#90](https://github.com/Icinga/icinga-powershell-framework/issues/90), Fix file type question during Icinga Agent installation on Windows 2012 R2 while using a custom installation target ## 1.1.2 (2020-07-01) diff --git a/lib/core/icingaagent/installer/Install-IcingaAgent.psm1 b/lib/core/icingaagent/installer/Install-IcingaAgent.psm1 index bb23a83..e9c596b 100644 --- a/lib/core/icingaagent/installer/Install-IcingaAgent.psm1 +++ b/lib/core/icingaagent/installer/Install-IcingaAgent.psm1 @@ -45,7 +45,7 @@ function Install-IcingaAgent() if ([string]::IsNullOrEmpty($InstallDir) -eq $FALSE) { if ((Test-Path $InstallDir) -eq $FALSE) { - New-Item -Path $InstallDir -Force | Out-Null; + New-Item -Path $InstallDir -ItemType Directory -Force | Out-Null; } $InstallTarget = $InstallDir; }