//How To Download File Using Windows PowerShell

How To Download File Using Windows PowerShell

4 (80%) 1 vote
Windows PowerShell

It’s been an age we downloading a file using built-in browser downloader or use Download Manager. But how if we downloading a file using Windows PowerShell? and you can attract like a hacker? bit funny, right?. Some of you may know what is Windows PowerShell (and of course experts and Developers know this). This powerfull tool is a built-in Windows feature giving you more access rather than Command Prompt. In the future, maybe PowerShell it’s might even replace Command Prompt because the more power and control over the OS. Microsoft developed it for task automation and configuration management process.

Based on the .NET Framework, it includes a command line interface and a scripting language. And today we will tell you how to download a file using Windows Powershell. Of course with pretty simple for beginner to apply. This is how we do it.

  1. Search on Start menu with powershell keyword and open it.


  1. Then copy link address you want to download using PowerShell and paste on Notepad (Why Notepad? because it’s simple program. 😉 ). Example: http://img.wblw.ml/Pg1USxlK.jpg

Screenshot (244)

  1. Now copy and paste the following command to Notepad first.

$client = new-object System.Net.WebClient
$client.DownloadFile(“Download Link”,“File Destination\file name.file extension”)

And now replace “Download Link” with your current link address. “File Destination” with location where you want to save the file, and “file name.file extension” with custom file name and extension. Example:

$client = new-object System.Net.WebClient
$client.DownloadFile(“http://img.wblw.ml/Pg1USxlK.jpg”,“F:\Pictures\Windows PC.jpg”)

(Note: DO NOT remove the double quotes or it won’t work)

If downloading any file requires you to enter credentials of some sort like server login details etc., then you can use the following command to download:

$client = new-object System.Net.WebClient
$client.Credentials = Get-Credential
$client.DownloadFile(“http://img.wblw.ml/Pg1USxlK.jpg”,“F:\Pictures\Windows PC.jpg”)


  1. After that, copy and paste the modified command to PowerShell window. Press Enter to start download.


  1. And that’s it! Easy right! The file is saved in location you input on the command.


How do you think? You can download almost any files using Windows PowerShell. Give it try.