Skip to content

Instantly share code, notes, and snippets.

@anthem001
Last active December 24, 2015 10:39
Show Gist options
  • Save anthem001/6785415 to your computer and use it in GitHub Desktop.
Save anthem001/6785415 to your computer and use it in GitHub Desktop.
Powershell version of Government down checker (original: http://t.co/Jf0LPYfMiU)
$webClient = new-object System.Net.WebClient
$webClient.Headers.Add("user-agent", "Is Govt Down Checker")
$output = ""
$output = $webClient.DownloadString("http://usa.gov")
if ($output -like "*Due to a lapse in funding, the U.S. federal government has shut down*") {
"Government is still down"
} else {
"Government is back up"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment