Posts

Showing posts with the label Test connection of remote computer

Check ping status of remote computer

#Name: Richa Sharma #Date: 19-Dec-2018 # Check ping status of remote computer (IP Address is not dynamic here) $output=Test-Connection 8.8.8.8 -Quiet if($output -eq $true) {     Write-Host "Alive" }  else {     Write-Host "Not pinging" }

Check test connectivity on remote servers with given IP range-Powershell Script

<#  Script to Test connection of first 10 remote computers within specific IP range (Depends on your environment) Data Required: First 3 octet IP range, can be done with 2 octet as well. Name : Richa Sharma #> # Creating variable dir, IP range : 192.168.1 $dir=1..10 | ForEach-Object {"192.168.1.$_"} foreach($temp in $dir) { $check=Test-Connection -Quiet $temp     if($check -eq $true)     {         Write-Output "$temp is pinging"      }    Else      {         Write-Output "$temp is not pinging"      } }