-Service -Name $serviceName
        if (($status.Status -eq "Paused") -or ($status.Status -eq "Pausing"))
        {
            $result = $COMPLIANT_CODE
        }
    }
    elseif ($desiredState -eq "Stopped")
    {
        $status = Get-Service -Name $serviceName
        if (($status.Status -eq "Stopped") -or ($status.Status -eq "Stopping"))
        {
            $result = $COMPLIANT_CODE
        }
    }
}
catch
{
    $result = $NOT_COMPLIANT_CODE
}

return $result
