mirror of
https://github.com/Icinga/icinga-powershell-framework.git
synced 2025-12-21 15:19:58 -05:00
14 lines
629 B
PowerShell
14 lines
629 B
PowerShell
function Remove-IcingaDirectorSelfServiceKey()
|
|
{
|
|
$Path = 'IcingaDirector.SelfService.ApiKey';
|
|
$Value = Get-IcingaPowerShellConfig $Path;
|
|
if ($null -ne $Value) {
|
|
Remove-IcingaPowerShellConfig 'IcingaDirector.SelfService.ApiKey';
|
|
$Value = Get-IcingaPowerShellConfig $Path;
|
|
if ($null -eq $Value) {
|
|
Write-IcingaConsoleNotice 'Icinga Director Self-Service Api key was successfully removed. Please dont forget to drop it within the Icinga Director as well';
|
|
}
|
|
} else {
|
|
Write-IcingaConsoleWarning 'There is no Self-Service Api key configured on this system';
|
|
}
|
|
}
|