icinga-powershell-framework/lib/core/tools/ConvertTo-IcingaSecureString.psm1
2021-03-01 11:15:21 +01:00

16 lines
321 B
PowerShell

<#
# Helper class allowing to easily convert strings into SecureStrings
# and vice-versa
#>
function ConvertTo-IcingaSecureString()
{
param (
[string]$String
);
if ([string]::IsNullOrEmpty($String)) {
return $null;
}
return (ConvertTo-SecureString -AsPlainText $string -Force);
}