Powershell 3.0 introduced Invoke-WebRequest cmdlet which offers a lot of options regarding HTTP requests. Rather then repeating the documentation and other sources, I’m going to show a simple example – the script below finds some specific links in the given web page and download them. It uses Invoke-WebRequest for both getting (and parsing) the web page and downloading files.

$url = ''
cd c:\temp\
$site = Invoke-WebRequest -Uri $url
$links = $site.Links | where href -like "*" | select -expand href
$links | % { Invoke-WebRequest -Uri $_ -OutFile (Split-Path $_ -Leaf) }