Last active
July 23, 2017 03:51
-
-
Save timgaunt/8862724 to your computer and use it in GitHub Desktop.
Call a url from PowerShell -useful for scheduling tasks in Windows
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
-ExecutionPolicy unrestricted -Command "(New-Object Net.WebClient).DownloadString(\"http://...aspx\")" | |
-ExecutionPolicy unrestricted -Command "(New-Object Net.WebClient).DownloadString($d=Get-Date;$t='{0:yyyyMMddTHHmmssZ}' -f $d.AddMinutes(-2);$f='{0:yyyyMMddTHHmmssZ}' -f $d.AddMinutes(-8);$url=\"http://...aspx?from=\" + $f + \"&to=\" + $t;write-host $url)" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment