Powershell: Read links in an HTTP page and download all the links

Read the links in an HTTP page $url = “http://mirror.internode.on.net/pub/test/10meg.test” $output = “$PSScriptRoot\10meg.test” $start_time = Get-Date Invoke-WebRequest -Uri $url -OutFile $output Download Files with System.Net.WebClient $url = “http://mirror.internode.on.net/pub/test/10meg.test” $output = “$PSScriptRoot\10meg.test” $start_time = Get-Date $wc = New-Object System.Net.WebClient $wc.DownloadFile($url, $output) #OR (New-Object System.Net.WebClient).DownloadFile($url, $output) Write-Output “Time taken: $((Get-Date).Subtract($start_time).Seconds) second(s)” Download…

Continue reading