mirror of
https://github.com/janikvonrotz/awesome-powershell.git
synced 2025-07-13 17:59:26 -04:00
Performance optimization
Updated Invoke-Webrequest to use the method 'head' to save time.
This commit is contained in:
parent
0041efd957
commit
8eb406734d
1 changed files with 2 additions and 2 deletions
|
@ -14,7 +14,7 @@
|
|||
Write-Host "Requesting url $url"
|
||||
|
||||
try {
|
||||
$request = Invoke-WebRequest -Uri $url
|
||||
$request = Invoke-WebRequest -Uri $url -DisableKeepAlive -UseBasicParsing -Method head
|
||||
} catch {
|
||||
Write-Warning -Message "Found dead url $url in $fileName"
|
||||
$unreachable += $url
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue