Basic Network Host Monitor in PowerShell

Basic Network Host Monitor in PowerShell

Postby admin » Tue Sep 13, 2016 4:45 pm

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
admin
Site Admin
 
Posts: 106
Joined: Mon Jan 18, 2010 11:05 am

Return to Powershell

Who is online

Users browsing this forum: No registered users and 2 guests

cron