icinga-powershell-framework/lib/daemons/RestAPI/client/Remove-IcingaRESTClientBlacklist.psm1
2021-10-27 10:06:13 +02:00

18 lines
447 B
PowerShell

function Remove-IcingaRESTClientBlacklist()
{
param (
[System.Net.Sockets.TcpClient]$Client = $null,
$ClientList = $null
);
if ($null -eq $Client) {
return;
}
[string]$Endpoint = Get-IcingaTCPClientRemoteEndpoint -Client $Client;
[string]$IpAddress = $Endpoint.Split(':')[0];
Remove-IcingaHashtableItem `
-Hashtable $ClientList `
-Key $IpAddress;
}