Last active
December 24, 2015 10:39
-
-
Save anthem001/6785415 to your computer and use it in GitHub Desktop.
Powershell version of Government down checker (original: http://t.co/Jf0LPYfMiU)
This file contains hidden or 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
| $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