Helper/Check-MMAgent.ps1

<#�
        .SYNOPSIS�
        Helper�function�to check if HealthService (MMAgent) is installed
#>

Function Check-MMAgent
{
    Try
    {
        If((Get-Service -Name 'HealthService' -ErrorAction SilentlyContinue))
        {
            $true
        }
        Else
        {
            $false
        }
    }
    Catch
    {
        Write-Warning -Message 'Install SCOM agent!'
    }
}