While I was preparing some scripts to automate the sideloading process of a Windows 8.1 app, I ran into a pretty silly problem. I was downloading the app package over HTTP from a local network, but PowerShell’s wget command was taking way too long. I knew it wasn’t a network problem because the file downloaded at a good speed by other means, but whenever I used wget the command took too long. A download of less than 2 seconds turned into a download of more than 10.
After spending a while on it, I found out that the problem was the package’s download progress indicator. All I had to do was turn it off and the performance became what I expected. To do this you only need to add this line before calling the wget command:
$ProgressPreference='SilentlyContinue'
If I wanted to show the progress indicator again for the following commands, I’d only have to set it back to its default value:
$progressPreference = 'Continue'
Anyway, it’s a silly thing that I’m sure anyone with a bit of PowerShell mileage already knows, but I’d better write it down here in case I need it again 😉