Created
December 14, 2015 17:11
-
-
Save mbrownnycnyc/06427daa3f19a2e6c850 to your computer and use it in GitHub Desktop.
SSRS warmer-upper... inspired by http://www.pawlowski.cz/2011/07/solving-issue-long-starting-report-ssrs-2008/#comment-307
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
#schtasks /create /tn "SSRS Recycle" /ru UserName /rl highest /np /sc daily /sd 08/01/2011 /st 02:00 /tr "powershell.exe -noprofile -executionpolicy RemoteSigned -file c:scriptsSSRSRecycle.ps1" | |
#http://www.pawlowski.cz/2011/07/solving-issue-long-starting-report-ssrs-2008/#comment-307 | |
$wc = new-Object System.Net.WebClient | |
$httpRequest = [System.Net.HttpWebRequest]::Create("http://localhost/Reports/Pages/Folder.aspx") | |
$httpRequest.Credentials =[System.Net.CredentialCache]::DefaultCredentials | |
$httpRequest.UnsafeAuthenticatedConnectionSharing = "true" | |
$httpRequest.Method = "GET" | |
# https://msdn.microsoft.com/en-us/library/system.net.httpwebrequest.timeout%28v=vs.110%29.aspx | |
#set timeout to 10 mins | |
$httpRequest.Timeout = 600000 | |
$objResponseReader = [System.IO.StreamReader]($httpRequest.GetResponse().GetResponseStream()) | |
$httpResponse = $objResponseReader.ReadToEnd().ToString() | |
$httpResponse |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment