Quantcast
Channel: PowerShell.com – PowerShell Scripts, Tips, Forums, and Resources
Viewing all articles
Browse latest Browse all 8583

Remoting - Reporting on more than one service, sending email in html format

$
0
0

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

 

 

 


Viewing all articles
Browse latest Browse all 8583

Trending Articles