mirror of
https://github.com/Icinga/icinga-powershell-framework.git
synced 2025-12-21 15:19:58 -05:00
19 lines
447 B
PowerShell
19 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;
|
||
|
|
}
|