PowerShell: Download Website

By Xah Lee. Date: .

Here's how to download a webpage.

# get a website content, save it as xx.html
iwr "google.com" -outfile xx.html

Windows 10 has curl builtin, at C:\Windows\system32\curl.exe

curl -h for help.

# download a html page
curl -O http://example.org/xyz/cat.html
# download all jpg files named cat01.jpg to cat20.jpg
curl -O http://example.org/xyz/cat[01-20].jpg
# download all jpg files named cat1.jpg to cat20.jpg
curl -O http://example.org/xyz/cat[1-20].jpg

PowerShell

Practical How-To

PowerShell in Depth

Programing PowerShell

String

Variable

Boolean

Conditional

Data Structure

Loop and Iteration

Read/Write File

Function

Profile and Script

Script Examples