Skip to content

Commit

Permalink
Updated version with help elements
Browse files Browse the repository at this point in the history
  • Loading branch information
Marco Simone Zuppone committed Jul 2, 2020
1 parent db436fc commit 700c60e
Showing 1 changed file with 23 additions and 6 deletions.
29 changes: 23 additions & 6 deletions Pinger.ps1
Original file line number Diff line number Diff line change
@@ -1,9 +1,28 @@

<#
.SYNOPSIS
Pings a comma separated list of addresses for a certain time with a specified interval.
.DESCRIPTION
Pings a comma separated list of addresses for a specified time with a specified interval frequency.
The times are specified through the parameters -Delay and -Seconds are expressed in seconds.
If the parameter -Seconds is omitted or set to zero the script runs continuously.
.PARAMETER IpList
A comma separated list of hosts or IPs
.PARAMETER Delay
The interfal between Pings. It is expressed in seconds and if is not specified it defalts to 160 seconds
.PARAMETER Seconds
It detemines for how long the program runs. It is expressed in seconds and it is not specified, or set to zero, the program never terminates
.EXAMPLE
Pinger 10.0.0.1,10.0.0.2,10.0.0.10 -Delay 30 -Seconds 300
.NOTES
Author: Marco S. Zuppone - msz@msz.eu
Version: 0.1
License: AGPL 3.0 - Plese abide to the Aferro AGPL 3.0 license rules! It's free bug give credit to the authors :-)
#>
param (
[Parameter(Mandatory)]
$AddrIPs,
$Delay=160,
$Seconds=0
[int]$Delay=160,
[int]$Seconds=0

)
Write-Host $Delay
Expand All @@ -29,6 +48,4 @@ Do {
}
}
until ($Exit)




0 comments on commit 700c60e

Please sign in to comment.