Skip to content

Instantly share code, notes, and snippets.

@chosenonehacks
Created September 13, 2017 07:21
Show Gist options
  • Save chosenonehacks/65658cffa084ed1937635cd2f13a104c to your computer and use it in GitHub Desktop.
Save chosenonehacks/65658cffa084ed1937635cd2f13a104c to your computer and use it in GitHub Desktop.
Powershell Download File One-Liners
#PowerShell (any version):
(New-Object System.Net.WebClient).DownloadFile("https://example.com/archive.zip", "C:\Windows\Temp\archive.zip")
#PowerShell 4.0 & 5.0:
Invoke-WebRequest "https://example.com/archive.zip" -OutFile "C:\Windows\Temp\archive.zip"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment