mirror of
https://github.com/Icinga/icinga-powershell-framework.git
synced 2025-12-21 15:19:58 -05:00
15 lines
598 B
PowerShell
15 lines
598 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-Host 'Icinga Director Self-Service Api key was successfully removed. Please dont forget to drop it within the Icinga Director as well';
|
||
|
|
}
|
||
|
|
} else {
|
||
|
|
Write-Host 'There is no Self-Service Api key configured on this system';
|
||
|
|
}
|
||
|
|
}
|