Anonymous Anonymous - 1 month ago
238 0

No description

PowerShell

Get all links from list of webpages

$InputLinks = Get-Content "c:\temp\InputLinks.txt"
ForEach ($InputLink in $InputLinks) {
	$OutputLinks = (Invoke-WebRequest -Uri $InputLink).Links
	$OutputLinks | Select-Object href | where {$_.href -like "*http*"} | Out-File -Append -FilePath C:\temp\OutputLinks.txt
	Clear-Variable OutputLinks
}