mirror of
https://github.com/Icinga/icinga-powershell-framework.git
synced 2025-12-21 07:10:15 -05:00
17 lines
494 B
PowerShell
17 lines
494 B
PowerShell
function New-IcingaWindowsUserPassword()
|
|
{
|
|
if ($null -eq $Global:Icinga) {
|
|
$Global:Icinga = @{
|
|
'ServiceUserPassword' = $null
|
|
};
|
|
}
|
|
|
|
if ($Global:Icinga.ContainsKey('ServiceUserPassword') -eq $FALSE) {
|
|
$Global:Icinga.Add('ServiceUserPassword', $null);
|
|
}
|
|
|
|
[SecureString]$Password = ConvertTo-IcingaSecureString -String (Get-IcingaRandomChars -Count 60);
|
|
$Global:Icinga.ServiceUserPassword = $Password;
|
|
|
|
return $Password;
|
|
}
|