Created
February 7, 2018 16:29
-
-
Save markwragg/e093f6895a2ca8d5c407c51b98afa7a2 to your computer and use it in GitHub Desktop.
Testing URLs with added personality
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
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