SHARE
TWEET

Untitled

a guest Dec 14th, 2019 78 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $ sudo apt-get install libunwind8
  2. $ wget https://github.com/PowerShell/PowerShell/releases/download/v6.0.2/powershell-6.0.2-linux-arm32.tar.gz
  3. $ mkdir ~/powershell
  4. $ tar -xvf ./powershell-6.0.2-linux-arm32.tar.gz -C ~/powershell
  5. $ sudo ln -s ~/powershell/pwsh /usr/bin/pwsh
  6. $ sudo ln -s ~/powershell/pwsh /usr/local/bin/powershell
  7. $ powershell
  8.  
  9.  
  10.  
  11. $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