MoonPoint Support Logo


Shop Amazon Warehouse Deals - Deep Discounts on Open-box and Used ProductsAmazon Warehouse Deals

Advanced Search
Sun Mon Tue Wed Thu Fri Sat
18 19 20 21
22 23 24 25 26 27 28
29 30 31        
OctNov Dec

Tue, Oct 10, 2017 11:31 pm

Wget and curl functionality via PowerShell on a Windows system

If you are accustomed to using the wget or cURL utilities on Linux or Mac OS X to download webpages from a command-line interface (CLI), there is a Gnu utility, Wget for Windows , that you can download and use on systems running Microsoft Windows. Alternatively, you can use the Invoke-WebRequest cmdlet from a PowerShell prompt, if you have version 3.0 or greater of PowerShell on the system. You can determine the version of PowerShell on a system by opening a PowerShell window and typing $psversiontable. E.g., in the example below from a Windows 10 system, the version of PowerShell is 5.1.15063.674.

PS C:\Users\public\documents> $psversiontable

Name                           Value
----                           -----
PSVersion                      5.1.15063.674
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.15063.674
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3

PS C:\Users\public\documents>

If you have version 3.0 or later, you can use wget or curl as an alias for the Invoke-WebRequest cmdlet, at least up through version 5.x. E.g., if I want to download the home page for the website to a file named index.html, I could use the command wget -OutFile index.html at a PowerShell prompt. Or I could use either of the following commands, instead:

curl -OutFile index.html
Invoke-WebRequest -OutFile index.html

[ More Info ]

[/os/windows/PowerShell] permanent link

Once You Know, You Newegg AliExpress by

Shop Amazon Local - Subscribe to Deals in Your Neighborhood

Valid HTML 4.01 Transitional

Privacy Policy   Contact

Blosxom logo