icinga-powershell-framework/lib/provider/services/ConvertTo-ServiceStatusCode.psm1

14 lines
No EOL
233 B
PowerShell

function ConvertTo-ServiceStatusCode()
{
param (
$Status
)
if ($Status -match "^\d+$") {
return $Status
} else {
$Status = $ProviderEnums.ServiceStatus.($Status);
}
return $Status;
}