Untitled
# Function to ping Hostname Function Ping-Device { $devicePing = Test-Connection RX281189 -Quiet return $devicePing } # Get returned value (On / Off) $deviceOn = Ping-Device if ( $deviceOn ) { Write-Output "Device is on" # MOVE TO NEXT STEP } else { Write-Output "Device is off" # MOVE TO END }