Skip to content

Instantly share code, notes, and snippets.

@markwragg
Created February 7, 2018 16:29
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save markwragg/e093f6895a2ca8d5c407c51b98afa7a2 to your computer and use it in GitHub Desktop.
Save markwragg/e093f6895a2ca8d5c407c51b98afa7a2 to your computer and use it in GitHub Desktop.
Testing URLs with added personality
ForEach ($URL in $URLs) {
Write-Host $URL -NoNewline ": "
Try {
Invoke-WebRequest $URL -UseBasicParsing | Out-Null
Write-Host ('Yup','Looks Good','OK' | Get-Random) -ForegroundColor Green
}Catch{
Write-Host $_ -ForegroundColor Red
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment