I'm trying to download an exe in my .bat file but I can't hide the output with
$progressPreference = 'silentlyContinue'
| Out-Null
and $null 2>&1.
I don't know why none of them worked.
This is the script that I'm using.
powershell "Invoke-WebRequest http://example.com/example.exe -OutFile "%UserProfileDir%\AppData\LocalLow\example_Data\example.exe"
It downloads the exe perfectly but I can't hide the output.