Last active
August 3, 2016 04:10
-
-
Save compustar/a0a845553f6939053cf7cf1e5ba876f6 to your computer and use it in GitHub Desktop.
Script to ping a web page to keep AppPool alive
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
| var http = WScript.CreateObject('Msxml2.XMLHTTP.6.0'); | |
| // Retrieve the url parameter | |
| var url = WScript.Arguments.Item(0) | |
| // Make the request | |
| http.open("GET", url, false); | |
| http.send(); | |
| // All done. Exit | |
| WScript.Quit(0); |
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", "PowerShell Script") | |
| $output = $webClient.DownloadString($Args[0]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment