I’m setting up a new IIS role on a new install of Windows Server 2019 core and I needed to grab a file from a remote webserver.
My go-to for this would be the powershell alias
wget. This is just an alias for Invoke-WebRequest. Problem, on Server Core is that it requires the Internet Explorer engine – which isn’t going to be available on Server Core.
One workaround is to use the
invoke-webrequest -usebasicparsing https://example.com/download.zip -out download.zip
But I also found another neat trick – and this method is a LOT faster to download during my testing.
Import-Module BitsTransfer Start-BitsTransfer -source "https://example.com/download.zip"
This will save the file in the working directory.