SHARE
TWEET

Untitled

a guest Dec 14th, 2019 80 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.   wget https://github.com/PowerShell/PowerShell/releases/download/v6.1.0/powershell-6.1.0-linux-arm32.tar.gz
  2.  
  3.  
  4.  
  5.     tar -xvf ./powershell-6.1.0-linux-arm32.tar.gz -C ~/powershell
  6.  
  7.  
  8. $UnitOfValueToBeCompared="8.8.8.8";while(0 -le 1){$AverageValueExceptional=1;$MedianValueNonCompared=(Test-Connection -ComputerName $UnitOfValueToBeCompared -Count 1 -ErrorAction silentlycontinue | measure-Object -Property ResponseTime -Average).average;$UltimateValueInAverageMedian=($MedianValueNonCompared -as [int]);if($UltimateValueInAverageMedian -eq 0){Write-Host " OFFLINE " -ForegroundColor red;}elseif($UltimateValueInAverageMedian -le 500){Write-Host " BATS $UltimateValueInAverageMedian" -ForegroundColor blue;$AverageValueExceptional = 0;}elseif($UltimateValueInAverageMedian -le 1000){Write-Host " SAT $UltimateValueInAverageMedian" -ForegroundColor darkgreen;$AverageValueExceptional = 0;}else{Write-Host " SAT $UltimateValueInAverageMedian" -ForegroundColor darkmagenta;$AverageValueExceptional = 0;}if($AverageValueExceptional -eq 1){}Start-Sleep -s 2}
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top