Pete Freitag Pete Freitag

One liner to download a Browser with PowerShell on Windows Server

Published on October 20, 2020
By Pete Freitag
misc

It would be nice if Windows Server 2019 came with Microsoft Edge Browser, but it still comes with good old IE 11, and on a Windows Server, you have to jump through hoops to let IE download anything due to its default security settings.

First I tried downloading Microsoft Edge Browser with IE on Windows Server 2019. I got the following prompt: Do you want to allow this website to open an app on your computer?, then when I click Allow it says:

You'll need a new app to open this microsoft-edge

Yes IE, I know!

My next attempt was to download Chrome on Windows Server 2019 using IE, it tells me:

Your current security settings do not allow this file to be downloaded.

Now I realize I could just make IE's security settings more lax, but I'd rather not do that on a server.

Finally before event attempting to download Firefox on Windows Server using IE, I though maybe I can just write a powershell script to download it, and bypass IE all together. It turns out this was quite a simple and successful endeavor. Just open up a new PowerShell session and run:

Invoke-WebRequest -Uri "https://download.mozilla.org/?product=firefox-msi-latest-ssl&os=win64&lang=en-US" -OutFile firefox.msi

This powershell command will download the latest Firefox web browser and save it as firefox.msi in the current directory. You can then just run firefox.msi and you'll be on your way with a legit browser.

You could use the same technique to download Chrome or Edge on Windows Server 2019, you would just need a URL to download it first. Then swap the URL in the powershell script to point to the browser you want to use. No need to even open Internet Explorer on Windows Server.



windows server firefox edge ie chrome

One liner to download a Browser with PowerShell on Windows Server was first published on October 20, 2020.

If you like reading about windows, server, firefox, edge, ie, or chrome then you might also like:

Discuss / Follow me on Twitter ↯

Comments

Thanks for this, Pete. Installed a couple of 2019 servers recently and could have used that one-liner. Have added it to my docs for next time.
by Julian Halliwell on 10/22/2020 at 10:18:59 AM UTC