Author Posts

April 25, 2014 at 10:24 am

I am attempting to monitor a port status for up/down.

I found a useful script on the technet site and get back valid results. But I am not at all sure as to how to email the result if the port is down.

The script I am trying to use is here:

When the port is up the result in the powershell window is:
Server : CATSRV01
Port : 52311
TypePort : UDP
Open : True

If this were to be OPEN: False, then how can I send an alert email?

September 15, 2014 at 10:18 am

I'm not sure I would use PowerShell as a monitoring tool myself, but Send-MailMessage can send an email.