XML file using DISM:ĭism.exe /online /Export-DefaultAppAssociations:C:\PS\DefaultAssoc.xml The current file association settings for programs configured under the current user can be exported to an. We have used the Basic PowerShell command to verify the default browser and change to Microsoft EDGE if the current default is Internet Explorer.This is possible for apps registered in the registry key HKEY_CLASSES_ROOT\Applications.Įxport and Import Default App Associations on Windows to the XML file The administrator can use this script as a Logon script using GPO or Task Sequence in SCCM to push this configuration. This small PowerShell script will allow the System admins to change the default browser from Internet Explorer to Microsoft Edge without bothering Chrome and Firefox users.įeel free to change the $result value in the command to use this script with any browser. New-ItemProperty -Path $registryPath -Name $name -Value $value -PropertyType String -Force | Out -NullĪt the next reboot, the system will update Microsoft EDGE as a default browser. $RegistryPath = 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\System' $Path = (Get-ItemProperty HKCU:\Software\Microsoft\Windows\Shell\Associations\UrlAssociations\http\UserChoice -Name ProgId).ProgId This way, the script will only create the Registry value if the condition match else it exits the script. Now merge both the PowerShell command and use the IF condition to match the value to IE.HTTP. New-ItemProperty -Path $registryPath -Name $name -Value $value -PropertyType String -Force | Out-Null $value = '\\NetworkShare\EDGE\defaultapplication.XML' $Name = "DefaultAssociationsConfiguration" The next step is to create registry value DefaultAssociationsConfiguration at HKLM:\SOFTWARE\Policies\Microsoft\Windows\System and set the value data to the XML file on Network Share ( \\NetworkShare\EDGE\defaultapplication.XML) using PowerShell. The table shows the meaning of each value, Value Data To do that, we will check the registry value of ProgId at HKCU:\Software\Microsoft\Windows\Shell\Associations\UrlAssociations\http\UserChoice. The next step is to capture the default browser details from the system using PowerShell. \\NetworkShare\EDGE\defaultapplication.XML I use the Microsoft document from the link to create an XML file that sets Microsoft Edge as the default application for specific protocols. Third, use the if condition in PowerShell to match & create the registry key for DefaultAssociationsConfiguration.Second, use the PowerShell command to capture the current default browser.First, create the default associations configuration file as per the Microsoft document and store that to Network Share with access to all users.I use simple PowerShell If condition to achieve the solution. I thought of a solution that only changes the default browser if the current default is Internet Explorer, not changing anything for the user with Chrome or Firefox. Here is the link to change the default browser for all users. Microsoft also provided the documentation to set Microsoft EDGE as default using GPO by configuring DefaultAssociationsConfiguration. In 2021, Microsoft stops support for Internet Explorer for most Azure and Office 365 applications, forcing all the windows customers to use other Browsers or Microsoft EDGE as the Default browser to get web application support. This article will cover the steps to set the Microsoft EDGE as Default Browser using PowerShell if the current browser is Internet Explorer.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |