mirror of
https://github.com/Icinga/icinga-powershell-framework.git
synced 2025-12-21 15:19:58 -05:00
19 lines
299 B
PowerShell
19 lines
299 B
PowerShell
|
|
function Get-IcingaHashtableItem()
|
||
|
|
{
|
||
|
|
param(
|
||
|
|
$Hashtable,
|
||
|
|
$Key,
|
||
|
|
$NullValue = $null
|
||
|
|
);
|
||
|
|
|
||
|
|
if ($null -eq $Hashtable) {
|
||
|
|
return $NullValue;
|
||
|
|
}
|
||
|
|
|
||
|
|
if ($Hashtable.ContainsKey($Key) -eq $FALSE) {
|
||
|
|
return $NullValue;
|
||
|
|
}
|
||
|
|
|
||
|
|
return $Hashtable[$Key];
|
||
|
|
}
|