Hi -
I have a script that works great and looks like this below. The problem is that I only want to know when anyone one of those services is stopped. Can anyone assist?
[string]$Body=Invoke-Command { Get-Service Besclient,SEPMasterService,SMCService } -computerName (Get-QADComputer-searchroot'something.corp/ou' } | Select-Object-expandName ) | Select-Object PSComputerName,Name,Status | ConvertTo-HtmlSend-MailMessage-SmtpServer"mailserver"-From"address"-To"address"-Subject"Svcs"-Body$body-BodyAsHtml