From 81d742591af6c6379a4988b0bac38ab7d8e5a3c3 Mon Sep 17 00:00:00 2001 From: Kent Ickler Date: Tue, 6 Sep 2022 09:31:31 -0600 Subject: [PATCH] Speedup IWR Disable ProgressBar to increase webrequest throughput https://stackoverflow.com/questions/28682642/powershell-why-is-using-invoke-webrequest-much-slower-than-a-browser-download $ProgressPreference = 'Continue' --- PowerMeta.ps1 | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/PowerMeta.ps1 b/PowerMeta.ps1 index 65b14fb..5a6efc1 100644 --- a/PowerMeta.ps1 +++ b/PowerMeta.ps1 @@ -1,4 +1,3 @@ -# Disable cert checks add-type @" using System.Net; using System.Security.Cryptography.X509Certificates; @@ -229,6 +228,8 @@ Function Invoke-PowerMeta{ } } + #Quiet ProgressBar to increase webrequest throughput + $ProgressPreference = 'SilentlyContinue' #Performing a Bing search second @@ -525,8 +526,6 @@ Function ExtractMetadata{ { Write-Output "[*] Exiftool.exe was not found in the current directory! Exiting." } - - } } else{ @@ -570,4 +569,6 @@ Function ExtractMetadata{ } } + #Return ProgressBar to default + $ProgressPreference = 'Continue' }