Use PowerShell to download any file on Windows 10
Windows PowerShell is a tool built into Windows 10. This tool has the ability to set up more features than Command Prompt, better operating system control . Most likely, PowerShell will replace Command Prompt in the future.
Microsoft has developed PowerShell for the purpose of automating tasks and configuration management processes. Based on the .NET Framework, PowerShell includes a command line interface and scripting language.
How to use PowerShell to download any file?
To download any file on Windows 10 using PowerShell, follow the steps below:
1. Open PowerShell under Admin. To do this, press the Windows key, then enter powershell in the Search frame. On the search results list, right-click Windows PowerShell (Desktop App) and select Run as administrator.
In the UAC popup window, click Yes.
2. Next copy the link of the file you want to download using PowerShell.
3. Copy and paste the following command into Notepad:
$ client = new-object System.Net.WebClient
$ client.DownloadFile ('Download Link', 'File Destinationfile name.file extension')
4. In the above command, replace Download Link with the link you copied in step 2. Insert the location path to download the same file name you want to save with the extension to replace the Destinationfile name.file extension .
Such as the example below:
$ client = new-object System.Net.WebClient
$ client.DownloadFile ('http://thewindowsclub.thewindowsclub.netdna-cdn.com/wp-content/upload/2016/Windows-Explorer-Process-Task-Manager-600x405.png','C:UsersDigdarshanPicturesTWCTask-Manager. png ')
5. Copy the command you have finished editing in the previous step, paste it into the PowerShell window and press Enter to download the file.
6. You can now navigate to the download folder path to find the downloaded files stored here.
If you download any file, you need to enter some other information such as server login details, . then you can use the following command to download the file:
$ client = new-object System.Net.WebClient
$ client.Credentials = Get-Credential
$ client.DownloadFile ('http://thewindowsclub.thewindowsclub.netdna-cdn.com/wp-content/upload/2016/Windows-Explorer-Process-Task-Manager-600x405.png','C:UsersDigdarshanPicturesTWCTask-Manager. png ')
Refer to some of the following articles:
- 10 PowerShell commands help you manage the remote computer most effectively
- Add the 'Open PowerShell here' option to the context menu in Windows
- 10 new features in Windows Server 2012
Good luck!
You should read it
- 10 PowerShell commands help you manage the remote computer most effectively
- About PowerShell
- PowerShell command in Windows
- What is PowerShell Basic commands in PowerShell
- How to install PowerShell 7.0 in Windows 10/8/7
- How are Command Prompt (cmd) and PowerShell different?
- How to use PowerShell's default parameter to change the command behavior
- Instructions on how to use PowerShell in Windows Server 2012
- How to check PowerShell version in Windows 10
- What to do when Windows can't find PowerShell?
- How to Run Powershell
- How to Install or Update PowerShell on Windows 11
Maybe you are interested
Should I use PowerShell or Command Prompt?
This PowerShell script can bypass Windows 11 system requirements, Microsoft Account
Windows PowerShell Could Allow Viruses to Infiltrate Undetected
PowerShell and everything you need to know about it
How to copy, delete, move, rename files/folders using PowerShell on Windows PC
What is Windows PowerShell? How to use Windows PowerShell