Created
June 26, 2018 13:24
-
-
Save Wesley-Lomax/3977df337147c3d39936782be388ac53 to your computer and use it in GitHub Desktop.
Fire web request at server with loop
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$targetSite = "https://hostname" | |
Write-Host "Requesting " $targetSite | |
while($true) | |
{ | |
Invoke-WebRequest -TimeoutSec 120 -method head -Uri $targetSite | Select-Object StatusCode, StatusDescription | |
Start-Sleep -Seconds 60 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment