diff --git a/doc/31-Changelog.md b/doc/31-Changelog.md index ba78d66..2391a2e 100644 --- a/doc/31-Changelog.md +++ b/doc/31-Changelog.md @@ -33,6 +33,7 @@ Check Command configuration generated by Icinga for Windows 1.2.0 require Icinga * [#88](https://github.com/Icinga/icinga-powershell-framework/issues/88) Adds Start/Stop timer functionality for performance analysis * [#94](https://github.com/Icinga/icinga-powershell-framework/issues/94) Adds `Namespace` argument for Get-IcingaWindowsInformation for additional filtering * [#95](https://github.com/Icinga/icinga-powershell-framework/issues/95) Improves error handling for issues by using `Use-Icinga` initialising or by calling plugins which are not installed +* [#98](https://github.com/Icinga/icinga-powershell-framework/issues/98) Adds support for SecureString as password argument on config generation ### Bugfixes diff --git a/lib/core/tools/Get-IcingaCheckCommandConfig.psm1 b/lib/core/tools/Get-IcingaCheckCommandConfig.psm1 index 76663ab..8b75a4b 100644 --- a/lib/core/tools/Get-IcingaCheckCommandConfig.psm1 +++ b/lib/core/tools/Get-IcingaCheckCommandConfig.psm1 @@ -175,6 +175,19 @@ function Get-IcingaCheckCommandConfig() 'order' = $Order; } ); + } elseif ($parameter.type.name -eq 'SecureString') { + # Convert out input string as SecureString + $Basket.Command[$Data.Name].arguments.Add( + [string]::Format('-{0}', $parameter.Name), @{ + 'value' = ( + [string]::Format( + "(ConvertTo-IcingaSecureString '{0}')", + $IcingaCustomVariable + ) + ) + 'order' = $Order; + } + ); } else { # Default to Object $Basket.Command[$Data.Name].arguments.Add(