Category filter

Script to set default browser on Windows

All Windows 10/11 devices come with Microsoft Edge set as the default browser. However, you can easily change the default browser to your preferred choice in different ways, including running a PowerShell script on the device. Using Hexnode’s Execute Custom Script action, you can remotely push any of the custom scripts provided below to change the default browser on your Windows endpoints.

Disclaimer:

The Sample Scripts provided below are adapted from third-party Open-Source sites.

Pre-requisite:

  • These scripts require the Windows device to be Azure AD joined.

PowerShell script to change the default browser to Google Chrome

PowerShell script to change the default browser to Mozilla Firefox

PowerShell script to change the default browser to Brave

PowerShell script to change the default browser to Microsoft Edge

Notes:

  • The above scripts will change the default browser for all the user accounts on the device.
  • A device restart is required for the changes to take effect.
  • The users would still be able to change the default browser from the device settings. However, the default browser configuration will get re-applied when the user logs in to the device the next time.
  • It is recommended to manually validate the script execution on a system before executing the action in bulk.
  • Hexnode will not be responsible for any damage/loss to the system on the behavior of the script.

  • Sample Script Repository