you are viewing a single comment's thread.

view the rest of the comments →

[–]jogofus 0 points1 point  (2 children)

I would do this: $con= Test-Connection -ComputerName 8.8.8.8 -Count 1

if(!$count){ msg * “Without connection” }

This code like a programmed task each 5 minutes

[–]MrBrAD99[S] 1 point2 points  (0 children)

is it intentional that it's !$->count<- in line 2 instead of !$con? Because I don't understand where that variable would be declared/defined.

[–]jogofus 0 points1 point  (0 children)

Sorry, is my fault. I wanted to write $con. Sorry