mirror of
https://github.com/Icinga/icinga-powershell-framework.git
synced 2025-12-21 15:19:58 -05:00
16 lines
321 B
PowerShell
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);
|
|
}
|