{"id":41275,"date":"2022-08-01T08:00:20","date_gmt":"2022-08-01T08:00:20","guid":{"rendered":"https:\/\/www.hexnode.com\/mobile-device-management\/help\/?p=41275"},"modified":"2022-08-03T10:20:48","modified_gmt":"2022-08-03T10:20:48","slug":"script-to-set-default-browser-on-windows","status":"publish","type":"post","link":"https:\/\/www.hexnode.com\/mobile-device-management\/help\/script-to-set-default-browser-on-windows\/","title":{"rendered":"Script to set default browser on Windows"},"content":{"rendered":"<p>All Windows 10\/11 devices come with <em>Microsoft Edge<\/em> 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\u2019s <a href=\"https:\/\/www.hexnode.com\/mobile-device-management\/help\/executing-custom-scripts-for-windows\/\" rel=\"noopener\" target=\"_blank\">Execute Custom Script<\/a> action, you can remotely push any of the custom scripts provided below to change the default browser on your Windows endpoints. <\/p>\n    \t\t<div class=\"hts-messages hts-messages--danger  hts-messages--withtitle hts-messages--withicon \"   >\r\n    \t\t\t<span class=\"hts-messages__title\">Disclaimer:<\/span>    \t\t\t    \t\t\t\t<p>\r\n    \t\t\t\t\t <\/p>\n<p>The Sample Scripts provided below are adapted from third-party Open-Source sites.<\/p>\n<p>    \t\t\t\t<\/p>\r\n    \t\t\t    \t\t\t\r\n    \t\t<\/div><!-- \/.ht-shortcodes-messages -->\r\n    \t\t\n    \t\t<div class=\"hts-messages hts-messages--info  hts-messages--withtitle hts-messages--withicon \"   >\r\n    \t\t\t<span class=\"hts-messages__title\">Pre-requisite:<\/span>    \t\t\t    \t\t\t\t<p>\r\n    \t\t\t\t\t <\/p>\n<ul>\n<li>\nThese scripts require the Windows device to be Azure AD joined.\n<\/li>\n<\/ul>\n<p>    \t\t\t\t<\/p>\r\n    \t\t\t    \t\t\t\r\n    \t\t<\/div><!-- \/.ht-shortcodes-messages -->\r\n    \t\t\n<h2> PowerShell script to change the default browser to Google Chrome <\/h2>\n<div class=\"copy-code-download\">\n<pre class=\"theme:github font:monospace font-size:17 line-height:32 top-set:false bottom-set:false toolbar:1 show-plain:3 lang:default decode:true inline-margin:\" title=\"PowerShell script to change the default browser to Google Chrome\"> \r\n\r\ntry\r\n{\r\n    Write-Host \"Starting script execution...\"\r\n    $namespaceName = \"root\\cimv2\\mdm\\dmmap\"\r\n    $className = \"MDM_Policy_Config01_ApplicationDefaults02\"\r\n    $obj=Get-CimInstance -Namespace $namespaceName -ClassName $className -Filter \"ParentID='.\/Vendor\/MSFT\/Policy\/Config' and InstanceID='ApplicationDefaults'\"\r\n    if($obj)\r\n    {\r\n        $obj.DefaultAssociationsConfiguration = 'PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4NCjxEZWZhdWx0QXNzb2NpYXRpb25zPg0KICA8QXNzb2NpYXRpb24gSWRlbnRpZmllcj0iLmh0bSIgUHJvZ0lkPSJDaHJvbWVIVE1MIiBBcHBsaWNhdGlvbk5hbWU9Ikdvb2dsZSBDaHJvbWUiIC8+DQogIDxBc3NvY2lhdGlvbiBJZGVudGlmaWVyPSIuaHRtbCIgUHJvZ0lkPSJDaHJvbWVIVE1MIiBBcHBsaWNhdGlvbk5hbWU9Ikdvb2dsZSBDaHJvbWUiIC8+DQogIDxBc3NvY2lhdGlvbiBJZGVudGlmaWVyPSJodHRwIiBQcm9nSWQ9IkNocm9tZUhUTUwiIEFwcGxpY2F0aW9uTmFtZT0iR29vZ2xlIENocm9tZSIgLz4NCiAgPEFzc29jaWF0aW9uIElkZW50aWZpZXI9Imh0dHBzIiBQcm9nSWQ9IkNocm9tZUhUTUwiIEFwcGxpY2F0aW9uTmFtZT0iR29vZ2xlIENocm9tZSIgLz4NCjwvRGVmYXVsdEFzc29jaWF0aW9ucz4='\r\n        Set-CimInstance -CimInstance $obj\r\n    }\r\n    else\r\n    {\r\n        $obj = New-CimInstance -Namespace $namespaceName -ClassName $className -Property @{ParentID=\".\/Vendor\/MSFT\/Policy\/Config\";InstanceID=\"ApplicationDefaults\";DefaultAssociationsConfiguration=\"PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4NCjxEZWZhdWx0QXNzb2NpYXRpb25zPg0KICA8QXNzb2NpYXRpb24gSWRlbnRpZmllcj0iLmh0bSIgUHJvZ0lkPSJDaHJvbWVIVE1MIiBBcHBsaWNhdGlvbk5hbWU9Ikdvb2dsZSBDaHJvbWUiIC8+DQogIDxBc3NvY2lhdGlvbiBJZGVudGlmaWVyPSIuaHRtbCIgUHJvZ0lkPSJDaHJvbWVIVE1MIiBBcHBsaWNhdGlvbk5hbWU9Ikdvb2dsZSBDaHJvbWUiIC8+DQogIDxBc3NvY2lhdGlvbiBJZGVudGlmaWVyPSJodHRwIiBQcm9nSWQ9IkNocm9tZUhUTUwiIEFwcGxpY2F0aW9uTmFtZT0iR29vZ2xlIENocm9tZSIgLz4NCiAgPEFzc29jaWF0aW9uIElkZW50aWZpZXI9Imh0dHBzIiBQcm9nSWQ9IkNocm9tZUhUTUwiIEFwcGxpY2F0aW9uTmFtZT0iR29vZ2xlIENocm9tZSIgLz4NCjwvRGVmYXVsdEFzc29jaWF0aW9ucz4=\"}\r\n    }\r\n    \r\n}\r\ncatch\r\n{\r\n    $_.Exception.Message\r\n}\r\n\r\nWrite-Host \"Script execution completed.\"\r\n\r\n<\/pre>\n<\/div>\n<h2> PowerShell script to change the default browser to Mozilla Firefox <\/h2>\n<div class=\"copy-code-download\">\n<pre class=\"theme:github font:monospace font-size:17 line-height:32 top-set:false bottom-set:false toolbar:1 show-plain:3 lang:default decode:true inline-margin:\" title=\"PowerShell script to change the default browser to Mozilla Firefox\"> \r\n\r\ntry\r\n{\r\n    Write-Host \"Starting script execution...\"    \r\n    $namespaceName = \"root\\cimv2\\mdm\\dmmap\"\r\n    $className = \"MDM_Policy_Config01_ApplicationDefaults02\"\r\n    $obj=Get-CimInstance -Namespace $namespaceName -ClassName $className -Filter \"ParentID='.\/Vendor\/MSFT\/Policy\/Config' and InstanceID='ApplicationDefaults'\"\r\n    if($obj)\r\n    {\r\n        $obj.DefaultAssociationsConfiguration = 'PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4NCjxEZWZhdWx0QXNzb2NpYXRpb25zPg0KICA8QXNzb2NpYXRpb24gSWRlbnRpZmllcj0iLmh0bSIgUHJvZ0lkPSJGaXJlZm94SFRNTC0zMDgwNDZCMEFGNEEzOUNCIiBBcHBsaWNhdGlvbk5hbWU9IkZpcmVmb3giIC8+DQogIDxBc3NvY2lhdGlvbiBJZGVudGlmaWVyPSIuaHRtbCIgUHJvZ0lkPSJGaXJlZm94SFRNTC0zMDgwNDZCMEFGNEEzOUNCIiBBcHBsaWNhdGlvbk5hbWU9IkZpcmVmb3giIC8+DQogIDxBc3NvY2lhdGlvbiBJZGVudGlmaWVyPSIucGRmIiBQcm9nSWQ9IkZpcmVmb3hQREYtMzA4MDQ2QjBBRjRBMzlDQiIgQXBwbGljYXRpb25OYW1lPSJGaXJlZm94IiAvPg0KICA8QXNzb2NpYXRpb24gSWRlbnRpZmllcj0iaHR0cCIgUHJvZ0lkPSJGaXJlZm94VVJMLTMwODA0NkIwQUY0QTM5Q0IiIEFwcGxpY2F0aW9uTmFtZT0iRmlyZWZveCIgLz4NCiAgPEFzc29jaWF0aW9uIElkZW50aWZpZXI9Imh0dHBzIiBQcm9nSWQ9IkZpcmVmb3hVUkwtMzA4MDQ2QjBBRjRBMzlDQiIgQXBwbGljYXRpb25OYW1lPSJGaXJlZm94IiAvPg0KPC9EZWZhdWx0QXNzb2NpYXRpb25zPg=='\r\n        Set-CimInstance -CimInstance $obj\r\n    }\r\n    else\r\n    {\r\n        $obj = New-CimInstance -Namespace $namespaceName -ClassName $className -Property @{ParentID=\".\/Vendor\/MSFT\/Policy\/Config\";InstanceID=\"ApplicationDefaults\";DefaultAssociationsConfiguration=\"PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4NCjxEZWZhdWx0QXNzb2NpYXRpb25zPg0KICA8QXNzb2NpYXRpb24gSWRlbnRpZmllcj0iLmh0bSIgUHJvZ0lkPSJGaXJlZm94SFRNTC0zMDgwNDZCMEFGNEEzOUNCIiBBcHBsaWNhdGlvbk5hbWU9IkZpcmVmb3giIC8+DQogIDxBc3NvY2lhdGlvbiBJZGVudGlmaWVyPSIuaHRtbCIgUHJvZ0lkPSJGaXJlZm94SFRNTC0zMDgwNDZCMEFGNEEzOUNCIiBBcHBsaWNhdGlvbk5hbWU9IkZpcmVmb3giIC8+DQogIDxBc3NvY2lhdGlvbiBJZGVudGlmaWVyPSIucGRmIiBQcm9nSWQ9IkZpcmVmb3hQREYtMzA4MDQ2QjBBRjRBMzlDQiIgQXBwbGljYXRpb25OYW1lPSJGaXJlZm94IiAvPg0KICA8QXNzb2NpYXRpb24gSWRlbnRpZmllcj0iaHR0cCIgUHJvZ0lkPSJGaXJlZm94VVJMLTMwODA0NkIwQUY0QTM5Q0IiIEFwcGxpY2F0aW9uTmFtZT0iRmlyZWZveCIgLz4NCiAgPEFzc29jaWF0aW9uIElkZW50aWZpZXI9Imh0dHBzIiBQcm9nSWQ9IkZpcmVmb3hVUkwtMzA4MDQ2QjBBRjRBMzlDQiIgQXBwbGljYXRpb25OYW1lPSJGaXJlZm94IiAvPg0KPC9EZWZhdWx0QXNzb2NpYXRpb25zPg==\"}\r\n    }\r\n}\r\ncatch\r\n{\r\n    $_.Exception.Message\r\n}\r\nWrite-Host \"Script execution completed.\"\r\n\r\n<\/pre>\n<\/div>\n<h2> PowerShell script to change the default browser to Brave <\/h2>\n<div class=\"copy-code-download\">\n<pre class=\"theme:github font:monospace font-size:17 line-height:32 top-set:false bottom-set:false toolbar:1 show-plain:3 lang:default decode:true inline-margin:\" title=\"PowerShell script to change the default browser to Brave\"> \r\n\r\ntry\r\n{\r\n    Write-Host \"Starting script execution...\"\r\n    $namespaceName = \"root\\cimv2\\mdm\\dmmap\"\r\n    $className = \"MDM_Policy_Config01_ApplicationDefaults02\"\r\n    $obj=Get-CimInstance -Namespace $namespaceName -ClassName $className -Filter \"ParentID='.\/Vendor\/MSFT\/Policy\/Config' and InstanceID='ApplicationDefaults'\"\r\n    if($obj)\r\n    {\r\n        $obj.DefaultAssociationsConfiguration = 'PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4NCjxEZWZhdWx0QXNzb2NpYXRpb25zPg0KICA8QXNzb2NpYXRpb24gSWRlbnRpZmllcj0iLmh0bSIgUHJvZ0lkPSJCcmF2ZUhUTUwiIEFwcGxpY2F0aW9uTmFtZT0iQnJhdmUiIC8+DQogIDxBc3NvY2lhdGlvbiBJZGVudGlmaWVyPSIuaHRtbCIgUHJvZ0lkPSJCcmF2ZUhUTUwiIEFwcGxpY2F0aW9uTmFtZT0iQnJhdmUiIC8+DQogIDxBc3NvY2lhdGlvbiBJZGVudGlmaWVyPSJodHRwIiBQcm9nSWQ9IkJyYXZlSFRNTCIgQXBwbGljYXRpb25OYW1lPSJCcmF2ZSIgLz4NCiAgPEFzc29jaWF0aW9uIElkZW50aWZpZXI9Imh0dHBzIiBQcm9nSWQ9IkJyYXZlSFRNTCIgQXBwbGljYXRpb25OYW1lPSJCcmF2ZSIgLz4NCjwvRGVmYXVsdEFzc29jaWF0aW9ucz4='\r\n        Set-CimInstance -CimInstance $obj\r\n    }\r\n    else\r\n    {\r\n        $obj = New-CimInstance -Namespace $namespaceName -ClassName $className -Property @{ParentID=\".\/Vendor\/MSFT\/Policy\/Config\";InstanceID=\"ApplicationDefaults\";DefaultAssociationsConfiguration=\"PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4NCjxEZWZhdWx0QXNzb2NpYXRpb25zPg0KICA8QXNzb2NpYXRpb24gSWRlbnRpZmllcj0iLmh0bSIgUHJvZ0lkPSJCcmF2ZUhUTUwiIEFwcGxpY2F0aW9uTmFtZT0iQnJhdmUiIC8+DQogIDxBc3NvY2lhdGlvbiBJZGVudGlmaWVyPSIuaHRtbCIgUHJvZ0lkPSJCcmF2ZUhUTUwiIEFwcGxpY2F0aW9uTmFtZT0iQnJhdmUiIC8+DQogIDxBc3NvY2lhdGlvbiBJZGVudGlmaWVyPSJodHRwIiBQcm9nSWQ9IkJyYXZlSFRNTCIgQXBwbGljYXRpb25OYW1lPSJCcmF2ZSIgLz4NCiAgPEFzc29jaWF0aW9uIElkZW50aWZpZXI9Imh0dHBzIiBQcm9nSWQ9IkJyYXZlSFRNTCIgQXBwbGljYXRpb25OYW1lPSJCcmF2ZSIgLz4NCjwvRGVmYXVsdEFzc29jaWF0aW9ucz4=\"}\r\n    }\r\n}\r\ncatch\r\n{\r\n    $_.Exception.Message\r\n}\r\nWrite-Host \"Script execution completed.\"\r\n\r\n<\/pre>\n<\/div>\n<h2> PowerShell script to change the default browser to Microsoft Edge <\/h2>\n<div class=\"copy-code-download\">\n<pre class=\"theme:github font:monospace font-size:17 line-height:32 top-set:false bottom-set:false toolbar:1 show-plain:3 lang:default decode:true inline-margin:\" title=\"PowerShell script to change the default browser to Microsoft Edge\"> \r\n\r\ntry\r\n{\r\n    Write-Host \"Starting script execution...\"\r\n    $namespaceName = \"root\\cimv2\\mdm\\dmmap\"\r\n    $className = \"MDM_Policy_Config01_ApplicationDefaults02\"\r\n    $obj=Get-CimInstance -Namespace $namespaceName -ClassName $className -Filter \"ParentID='.\/Vendor\/MSFT\/Policy\/Config' and InstanceID='ApplicationDefaults'\"\r\n    if($obj)\r\n    {\r\n        $obj.DefaultAssociationsConfiguration = 'PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4NCjxEZWZhdWx0QXNzb2NpYXRpb25zPg0KICA8QXNzb2NpYXRpb24gSWRlbnRpZmllcj0iLmh0bSIgUHJvZ0lkPSJNU0VkZ2VIVE0iIEFwcGxpY2F0aW9uTmFtZT0iTWljcm9zb2Z0IEVkZ2UiIC8+DQogIDxBc3NvY2lhdGlvbiBJZGVudGlmaWVyPSIuaHRtbCIgUHJvZ0lkPSJNU0VkZ2VIVE0iIEFwcGxpY2F0aW9uTmFtZT0iTWljcm9zb2Z0IEVkZ2UiIC8+DQogIDxBc3NvY2lhdGlvbiBJZGVudGlmaWVyPSIubWh0IiBQcm9nSWQ9Ik1TRWRnZUhUTSIgQXBwbGljYXRpb25OYW1lPSJNaWNyb3NvZnQgRWRnZSIgLz4NCiAgPEFzc29jaWF0aW9uIElkZW50aWZpZXI9Ii5taHRtbCIgUHJvZ0lkPSJNU0VkZ2VIVE0iIEFwcGxpY2F0aW9uTmFtZT0iTWljcm9zb2Z0IEVkZ2UiIC8+DQogIDxBc3NvY2lhdGlvbiBJZGVudGlmaWVyPSIuc3ZnIiBQcm9nSWQ9Ik1TRWRnZUhUTSIgQXBwbGljYXRpb25OYW1lPSJNaWNyb3NvZnQgRWRnZSIgLz4NCiAgPEFzc29jaWF0aW9uIElkZW50aWZpZXI9Imh0dHAiIFByb2dJZD0iTVNFZGdlSFRNIiBBcHBsaWNhdGlvbk5hbWU9Ik1pY3Jvc29mdCBFZGdlIiAvPg0KICA8QXNzb2NpYXRpb24gSWRlbnRpZmllcj0iaHR0cHMiIFByb2dJZD0iTVNFZGdlSFRNIiBBcHBsaWNhdGlvbk5hbWU9Ik1pY3Jvc29mdCBFZGdlIiAvPg0KICA8QXNzb2NpYXRpb24gSWRlbnRpZmllcj0ibWljcm9zb2Z0LWVkZ2UiIFByb2dJZD0iTVNFZGdlSFRNIiBBcHBsaWNhdGlvbk5hbWU9Ik1pY3Jvc29mdCBFZGdlIiAvPg0KICA8QXNzb2NpYXRpb24gSWRlbnRpZmllcj0ibWljcm9zb2Z0LWVkZ2UtaG9sb2dyYXBoaWMiIFByb2dJZD0iTVNFZGdlSFRNIiBBcHBsaWNhdGlvbk5hbWU9Ik1pY3Jvc29mdCBFZGdlIiAvPg0KICA8QXNzb2NpYXRpb24gSWRlbnRpZmllcj0ibXMteGJsLTNkOGI5MzBmIiBQcm9nSWQ9Ik1TRWRnZUhUTSIgQXBwbGljYXRpb25OYW1lPSJNaWNyb3NvZnQgRWRnZSIgLz4NCiAgPEFzc29jaWF0aW9uIElkZW50aWZpZXI9InJlYWQiIFByb2dJZD0iTVNFZGdlSFRNIiBBcHBsaWNhdGlvbk5hbWU9Ik1pY3Jvc29mdCBFZGdlIiAvPg0KPC9EZWZhdWx0QXNzb2NpYXRpb25zPg=='\r\n        Set-CimInstance -CimInstance $obj\r\n    }\r\n    else\r\n    {\r\n        $obj = New-CimInstance -Namespace $namespaceName -ClassName $className -Property @{ParentID=\".\/Vendor\/MSFT\/Policy\/Config\";InstanceID=\"ApplicationDefaults\";DefaultAssociationsConfiguration=\"PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4NCjxEZWZhdWx0QXNzb2NpYXRpb25zPg0KICA8QXNzb2NpYXRpb24gSWRlbnRpZmllcj0iLmh0bSIgUHJvZ0lkPSJNU0VkZ2VIVE0iIEFwcGxpY2F0aW9uTmFtZT0iTWljcm9zb2Z0IEVkZ2UiIC8+DQogIDxBc3NvY2lhdGlvbiBJZGVudGlmaWVyPSIuaHRtbCIgUHJvZ0lkPSJNU0VkZ2VIVE0iIEFwcGxpY2F0aW9uTmFtZT0iTWljcm9zb2Z0IEVkZ2UiIC8+DQogIDxBc3NvY2lhdGlvbiBJZGVudGlmaWVyPSIubWh0IiBQcm9nSWQ9Ik1TRWRnZUhUTSIgQXBwbGljYXRpb25OYW1lPSJNaWNyb3NvZnQgRWRnZSIgLz4NCiAgPEFzc29jaWF0aW9uIElkZW50aWZpZXI9Ii5taHRtbCIgUHJvZ0lkPSJNU0VkZ2VIVE0iIEFwcGxpY2F0aW9uTmFtZT0iTWljcm9zb2Z0IEVkZ2UiIC8+DQogIDxBc3NvY2lhdGlvbiBJZGVudGlmaWVyPSIuc3ZnIiBQcm9nSWQ9Ik1TRWRnZUhUTSIgQXBwbGljYXRpb25OYW1lPSJNaWNyb3NvZnQgRWRnZSIgLz4NCiAgPEFzc29jaWF0aW9uIElkZW50aWZpZXI9Imh0dHAiIFByb2dJZD0iTVNFZGdlSFRNIiBBcHBsaWNhdGlvbk5hbWU9Ik1pY3Jvc29mdCBFZGdlIiAvPg0KICA8QXNzb2NpYXRpb24gSWRlbnRpZmllcj0iaHR0cHMiIFByb2dJZD0iTVNFZGdlSFRNIiBBcHBsaWNhdGlvbk5hbWU9Ik1pY3Jvc29mdCBFZGdlIiAvPg0KICA8QXNzb2NpYXRpb24gSWRlbnRpZmllcj0ibWljcm9zb2Z0LWVkZ2UiIFByb2dJZD0iTVNFZGdlSFRNIiBBcHBsaWNhdGlvbk5hbWU9Ik1pY3Jvc29mdCBFZGdlIiAvPg0KICA8QXNzb2NpYXRpb24gSWRlbnRpZmllcj0ibWljcm9zb2Z0LWVkZ2UtaG9sb2dyYXBoaWMiIFByb2dJZD0iTVNFZGdlSFRNIiBBcHBsaWNhdGlvbk5hbWU9Ik1pY3Jvc29mdCBFZGdlIiAvPg0KICA8QXNzb2NpYXRpb24gSWRlbnRpZmllcj0ibXMteGJsLTNkOGI5MzBmIiBQcm9nSWQ9Ik1TRWRnZUhUTSIgQXBwbGljYXRpb25OYW1lPSJNaWNyb3NvZnQgRWRnZSIgLz4NCiAgPEFzc29jaWF0aW9uIElkZW50aWZpZXI9InJlYWQiIFByb2dJZD0iTVNFZGdlSFRNIiBBcHBsaWNhdGlvbk5hbWU9Ik1pY3Jvc29mdCBFZGdlIiAvPg0KPC9EZWZhdWx0QXNzb2NpYXRpb25zPg==\"}\r\n    }\r\n}\r\ncatch\r\n{\r\n    $_.Exception.Message\r\n}\r\nWrite-Host \"Script execution completed.\"\r\n\r\n<\/pre>\n<\/div>\n    \t\t<div class=\"hts-messages hts-messages--info  hts-messages--withtitle hts-messages--withicon \"   >\r\n    \t\t\t<span class=\"hts-messages__title\">Notes:<\/span>    \t\t\t    \t\t\t\t<p>\r\n    \t\t\t\t\t <\/p>\n<ul>\n<li>\nThe above scripts will change the default browser for all the user accounts on the device.\n<\/li>\n<li>\nA <a href=\"https:\/\/www.hexnode.com\/mobile-device-management\/help\/restart-a-device-using-hexnode-mdm\/\" rel=\"noopener\" target=\"_blank\">device restart<\/a> is required for the changes to take effect.\n<\/li>\n<li>\nThe 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.\n<\/li>\n<li>\nIt is recommended to manually validate the script execution on a system before executing the action in bulk.\n<\/li>\n<li>\nHexnode will not be responsible for any damage\/loss to the system on the behavior of the script.\n<\/li>\n<\/ul>\n<p>    \t\t\t\t<\/p>\r\n    \t\t\t    \t\t\t\r\n    \t\t<\/div><!-- \/.ht-shortcodes-messages -->\r\n    \t\t\n","protected":false},"excerpt":{"rendered":"<p>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\u2019s Execute Custom Script action, you can remotely push any of the custom scripts provided below to change [&hellip;]<\/p>\n","protected":false},"author":46,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"inline_featured_image":false,"footnotes":""},"categories":[265,263],"tags":[320,314,326],"class_list":["post-41275","post","type-post","status-publish","format-standard","hentry","category-windows-sample-script-repository","category-sample-script-repository","tag-app-management","tag-browser","tag-general-settings"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.6 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Script to set default browser on Windows - Hexnode Help Center<\/title>\n<meta name=\"description\" content=\"Remotely set a default browser on your Windows device by running this PowerShell script using Hexnode\u2019s Execute Custom Script action.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.hexnode.com\/mobile-device-management\/help\/script-to-set-default-browser-on-windows\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Script to set default browser on Windows - Hexnode Help Center\" \/>\n<meta property=\"og:description\" content=\"Remotely set a default browser on your Windows device by running this PowerShell script using Hexnode\u2019s Execute Custom Script action.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.hexnode.com\/mobile-device-management\/help\/script-to-set-default-browser-on-windows\/\" \/>\n<meta property=\"og:site_name\" content=\"Hexnode Help Center\" \/>\n<meta property=\"article:published_time\" content=\"2022-08-01T08:00:20+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-08-03T10:20:48+00:00\" \/>\n<meta name=\"author\" content=\"irfan\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"irfan\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.hexnode.com\/mobile-device-management\/help\/script-to-set-default-browser-on-windows\/\",\"url\":\"https:\/\/www.hexnode.com\/mobile-device-management\/help\/script-to-set-default-browser-on-windows\/\",\"name\":\"Script to set default browser on Windows - Hexnode Help Center\",\"isPartOf\":{\"@id\":\"https:\/\/www.hexnode.com\/mobile-device-management\/help\/#website\"},\"datePublished\":\"2022-08-01T08:00:20+00:00\",\"dateModified\":\"2022-08-03T10:20:48+00:00\",\"author\":{\"@id\":\"https:\/\/www.hexnode.com\/mobile-device-management\/help\/#\/schema\/person\/18ce7440031fefef8ed901142058f5c6\"},\"description\":\"Remotely set a default browser on your Windows device by running this PowerShell script using Hexnode\u2019s Execute Custom Script action.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.hexnode.com\/mobile-device-management\/help\/script-to-set-default-browser-on-windows\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.hexnode.com\/mobile-device-management\/help\/script-to-set-default-browser-on-windows\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.hexnode.com\/mobile-device-management\/help\/script-to-set-default-browser-on-windows\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.hexnode.com\/mobile-device-management\/help\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Script to set default browser on Windows\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.hexnode.com\/mobile-device-management\/help\/#website\",\"url\":\"https:\/\/www.hexnode.com\/mobile-device-management\/help\/\",\"name\":\"Hexnode Help Center\",\"description\":\"Mobile Device Management Help\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.hexnode.com\/mobile-device-management\/help\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.hexnode.com\/mobile-device-management\/help\/#\/schema\/person\/18ce7440031fefef8ed901142058f5c6\",\"name\":\"irfan\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.hexnode.com\/mobile-device-management\/help\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/72c69a6e6b85529428a396741421f39d6a7e03661e68056f301ce7392543147d?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/72c69a6e6b85529428a396741421f39d6a7e03661e68056f301ce7392543147d?s=96&d=mm&r=g\",\"caption\":\"irfan\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Script to set default browser on Windows - Hexnode Help Center","description":"Remotely set a default browser on your Windows device by running this PowerShell script using Hexnode\u2019s Execute Custom Script action.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.hexnode.com\/mobile-device-management\/help\/script-to-set-default-browser-on-windows\/","og_locale":"en_US","og_type":"article","og_title":"Script to set default browser on Windows - Hexnode Help Center","og_description":"Remotely set a default browser on your Windows device by running this PowerShell script using Hexnode\u2019s Execute Custom Script action.","og_url":"https:\/\/www.hexnode.com\/mobile-device-management\/help\/script-to-set-default-browser-on-windows\/","og_site_name":"Hexnode Help Center","article_published_time":"2022-08-01T08:00:20+00:00","article_modified_time":"2022-08-03T10:20:48+00:00","author":"irfan","twitter_card":"summary_large_image","twitter_misc":{"Written by":"irfan","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.hexnode.com\/mobile-device-management\/help\/script-to-set-default-browser-on-windows\/","url":"https:\/\/www.hexnode.com\/mobile-device-management\/help\/script-to-set-default-browser-on-windows\/","name":"Script to set default browser on Windows - Hexnode Help Center","isPartOf":{"@id":"https:\/\/www.hexnode.com\/mobile-device-management\/help\/#website"},"datePublished":"2022-08-01T08:00:20+00:00","dateModified":"2022-08-03T10:20:48+00:00","author":{"@id":"https:\/\/www.hexnode.com\/mobile-device-management\/help\/#\/schema\/person\/18ce7440031fefef8ed901142058f5c6"},"description":"Remotely set a default browser on your Windows device by running this PowerShell script using Hexnode\u2019s Execute Custom Script action.","breadcrumb":{"@id":"https:\/\/www.hexnode.com\/mobile-device-management\/help\/script-to-set-default-browser-on-windows\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.hexnode.com\/mobile-device-management\/help\/script-to-set-default-browser-on-windows\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.hexnode.com\/mobile-device-management\/help\/script-to-set-default-browser-on-windows\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.hexnode.com\/mobile-device-management\/help\/"},{"@type":"ListItem","position":2,"name":"Script to set default browser on Windows"}]},{"@type":"WebSite","@id":"https:\/\/www.hexnode.com\/mobile-device-management\/help\/#website","url":"https:\/\/www.hexnode.com\/mobile-device-management\/help\/","name":"Hexnode Help Center","description":"Mobile Device Management Help","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.hexnode.com\/mobile-device-management\/help\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.hexnode.com\/mobile-device-management\/help\/#\/schema\/person\/18ce7440031fefef8ed901142058f5c6","name":"irfan","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.hexnode.com\/mobile-device-management\/help\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/72c69a6e6b85529428a396741421f39d6a7e03661e68056f301ce7392543147d?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/72c69a6e6b85529428a396741421f39d6a7e03661e68056f301ce7392543147d?s=96&d=mm&r=g","caption":"irfan"}}]}},"_links":{"self":[{"href":"https:\/\/www.hexnode.com\/mobile-device-management\/help\/wp-json\/wp\/v2\/posts\/41275","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hexnode.com\/mobile-device-management\/help\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hexnode.com\/mobile-device-management\/help\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hexnode.com\/mobile-device-management\/help\/wp-json\/wp\/v2\/users\/46"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hexnode.com\/mobile-device-management\/help\/wp-json\/wp\/v2\/comments?post=41275"}],"version-history":[{"count":5,"href":"https:\/\/www.hexnode.com\/mobile-device-management\/help\/wp-json\/wp\/v2\/posts\/41275\/revisions"}],"predecessor-version":[{"id":41413,"href":"https:\/\/www.hexnode.com\/mobile-device-management\/help\/wp-json\/wp\/v2\/posts\/41275\/revisions\/41413"}],"wp:attachment":[{"href":"https:\/\/www.hexnode.com\/mobile-device-management\/help\/wp-json\/wp\/v2\/media?parent=41275"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hexnode.com\/mobile-device-management\/help\/wp-json\/wp\/v2\/categories?post=41275"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hexnode.com\/mobile-device-management\/help\/wp-json\/wp\/v2\/tags?post=41275"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}