Downloading files via the commandline (Windows)


  • Methods to download files via the Windows commandline.

Powershell 2.0:
Download a file via HTTP:

$client = New-Object "System.Net.WebClient"


Powershell > 3.0:
Download a file via HTTP:

Invoke-WebRequest -uri "" -outfile ".\nc.exe"

Download a file via FTP:

Invoke-WebRequest -uri "" -outfile ".\nc.exe" -credential ftpuser

note: wget is in Powershell an alias for Invoke-WebRequest, don’t mix this up with the tool wget.

Download via bitsadmin:

bitsadmin /transfer n "" "c:\users\mambo yoyo\sbd.exe"