yeap i got the concepts.
If i have a list of computers to ping, can i have a *group gadget* or one
gadget for every single machine ?
"Marco Shaw [MVP]" <marco.shaw@_NO_SPAM_gmail.com> wrote in message
news:ePaekS3VIHA.5348@xxxxxx
Quote:
> Quote:
>> I can either:
>> 1. Provide you .NET code to call from PowerShell to do the same thing.
>> 2. Help you do that digital gauge that might just say "UP" or "DOWN".
>
> #1:
> PSH> ./ping|out-gauge -type digital
> PSH> get-content ping.ps1
> $computer="localhost"
>
> $ping= new-object System.Net.NetworkInformation.Ping
> $response=$ping.send($computer)
>
> if ($response.Status -eq "Success")
> {
> $computer+" is up"
> }
> else
> {
> $computer+" is down"
> }
>
> #2:
> Using .NET to get a random number:
> PSH> $rand=new-object System.Random
> PSH> $rand.Next(0,5) <--Gives a random number, only 0,1,2,3 or 4
> 3
> PSH> $rand.Next(0,5)
> 4
> PSH> $rand.Next(0,5)
> 1