Skip to content

Instantly share code, notes, and snippets.

@compustar
Last active August 3, 2016 04:10
Show Gist options
  • Select an option

  • Save compustar/a0a845553f6939053cf7cf1e5ba876f6 to your computer and use it in GitHub Desktop.

Select an option

Save compustar/a0a845553f6939053cf7cf1e5ba876f6 to your computer and use it in GitHub Desktop.
Script to ping a web page to keep AppPool alive
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);
$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