I have created this PS monitor using community MP but state always shows healthy even when SharePoint crawl search is Paused, please help, if I am missing anything.
$ScomAPI = New-Object -comObject “MOM.ScriptAPI”
$PropertyBag = $ScomAPI.CreatePropertyBag()
$State = Get-SPEnterpriseSearchServiceApplication | Get-SPEnterpriseSearchCrawlContentSource
$PropertyBag.AddValue(“State”,$State)
$PropertyBag