Advertisements

How To Download Files Using Windows PowerShell

  • Post last modified:October 21, 2023
  • Post category:Windows
  • Post comments:0 Comments
  • Reading time:4 mins read

In this post, I will show you how to use Windows PowerShell to download files and save them to your Windows system.

Table of Contents:

Method 1

Advertisements

First, open the Windows Powershell. To do that Press Win (windows key) + X and select “Windows PowerShell” or “Windows PowerShell (Admin)” to launch PowerShell.

Opening Powershell in windows

Command structure to start the download:

Invoke-WebRequest -Uri "URL" -OutFile "Path\filename.extension"

Replace “URL” with the web address of the file you want to download, and “Path\filename.extension” with the local file directory where you want to save the file.

Hit Enter to execute the command. PowerShell will start the download process and save the file to your location.

Downloaded File using powershell

Method 2

For those who prefer a quicker way, Use the Windows File Explorer to locate the directory where you want to save the downloaded file.

In the directory’s address bar, replace the current path with “powershell” and press Enter. This will open a PowerShell window inside the current directory.

Opening Powershell inside a directory

In the PowerShell window, enter the command:

Invoke-WebRequest -Uri "URL" -OutFile "filename.zip"

Advertisements

Replace “URL” and “filename.zip” with the name and extension.

Downloaded File to a Directory using Method 2

Windows PowerShell provides an efficient way to download files directly from the command line and doesn’t want any web browser to download files. if you have any questions about this post please leave a comment…

Leave a Reply