How to download a file from the Internet from Powershell in Windows 10

To make configuration changes using PowerShell, you need to know the appropriate commands for each particular task. The same happens when you want to activate or deactivate a function, you need to know the steps to follow for it. And with PowerShell you can see the programs installed on a local or remote computer.

How to download a file from the Internet from PowerShell in Windows 10

The innovative changes that Windows 10 has included in its platform, it was worth saying with its millions of users that you were a little disappointed with the version of Windows 8. And one of these novelties is the PowerShell console, which through specific commands can perform a certain task .



Using PowerShell is so simple that we will only need a simple command that we will write directly in its window. With this command we can download a file from the Internet and we will show you what are the steps you need to take to do this quickly and easily.

The first step is to go to the taskbar and type in the Windows 10 search drawer, PowerShell. This action will cause the console to open PowerShell you need to make sure you have administrator permission. To do this, you just have to select the application with the mouse cursor and right-click and choose the option Run as administrator.

A blue window should be open, here we will copy the link of the file we want to download that we did earlier. The we will paste in the following way by writing this syntax: $ client = new-object System.Net.WebClient –  $ client.DownloadFile ("Download link", "Destination file name of the file.extension")


We have to change «Link for the download» with the URL containing the address of the file and which we copied earlier. And in «Destination file name of the file.extension» you have to enter the path where the file will be saved and the name we will give it. In both the URL and the download path, the quotation marks must be kept.


The next step will be to press the Enter key, the action will be performed automatically and the file you have chosen will start to be downloaded to the address you indicated. Now you just have to wait for the download to finish and look in the address you specified and in this way check that it was successfully saved.


How to download a file from the Internet that requires credentials from PowerShell

You may want to download a file that asks you for a credential so that you can log into a specific server.

In these cases we can use the following command: $ client = new-object System.Net.WebClient –  $ client.Credentials = Get-Credential -   $ client.DownloadFile ("Download link", "Destination filename.extension")

How to download a file from the Internet from Powershell in Windows 10


And these simple commands are what we need to be able to download a file from the Internet from PowerShell in Windows 10. Remember not to remove the quotes in the link or download address of the file on your computer. So you can download any file, using this powerful tool included with Windows 10.

add a comment of How to download a file from the Internet from Powershell in Windows 10
Comment sent successfully! We will review it in the next few hours.