Page 1 of 1

Basic Network Host Monitor in PowerShell

PostPosted: Tue Sep 13, 2016 4:45 pm
by admin
PowerShell has it's own version of the Windows command line ping command.

The cmdlet is :

Test-Connection

When running the cmdlet from the PowerShell command line, it can test if a host is up or down providing that ICMP traffic is allowed to that host.

We can write a PowerShell script that makes use of this cmdlet so that we can keep the cmdlet running overnight or over long periods of time and just log the status changes i.e. if the initial run confirms that the host is up, we will only put another log entry when the host registers as down. We won't register another entry until the host is back up.

I have written the script in my blog here :

http://networkadministratorsurvivalkit.blogspot.com.au/2016/07/powershell-script-to-test-if-host-is-up.html