2019-12-12 10:00:39 -05:00
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 ) {
2020-05-13 10:53:15 -04:00
Write-IcingaConsoleNotice 'Icinga Director Self-Service Api key was successfully removed. Please dont forget to drop it within the Icinga Director as well' ;
2019-12-12 10:00:39 -05:00
}
} else {
2020-05-13 10:53:15 -04:00
Write-IcingaConsoleWarning 'There is no Self-Service Api key configured on this system' ;
2019-12-12 10:00:39 -05:00
}
}