Quantcast
Viewing all articles
Browse latest Browse all 16365

PowerShell monitor for Office Web Apps server

Been banging my head a bit here; figured I'd see if the community has a light to shed.

 

Trying to create a PowerShell script monitor for my Office Web Apps servers.

What I want it to do is run 'Get-OfficeWebAppsMachine' and if the HealthStatus property of the result is Healthy, mark the component as Up. If the property value is 'UnHealthy' mark it down, anything else mark as Unknown.

 

I've tried a few permutations, but the Test Script Output always just says 'Not Defined'.

 

Here's one of the scripts I tried:

Import-Module OfficeWebApps

$health = (Get-OfficeWebAppsMachine).HealthStatus

if ($health -eq 'Healthy'){

    $stat = '0'

    write-host "Health.Message: $health"

    Write-host "Health.Statistic: $stat"

    Exit(0)

}


Viewing all articles
Browse latest Browse all 16365

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>