How can I uninstall default edge on windows 10?

Het Desai 0 Reputation points
2024-05-22T16:02:59.88+00:00

I'm trying to uninstall default edge browser from windows 10 machine and after that I need to install a specific version of enterprise edge into my machine. All this needs to be done through powershell as later on I'll automate the process using ansible. Where my installed version is 125.0.02535.51 and I need to install is MicrosoftEdgeEnterprise_X64_v115.0.1901.203

Windows for business | Windows Client for IT Pros | User experience | Other
Microsoft Edge | Microsoft Edge development
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. S.Sengupta 24,636 Reputation points MVP
    2024-05-23T00:36:44.98+00:00

    Here's a combined script to uninstall the existing Microsoft Edge and install the specific version of Microsoft Edge Enterprise. For this you need to open PowerShell as Administrator:

    # Uninstall default Microsoft Edge
    $EdgePackage = Get-AppxPackage -Name Microsoft.MicrosoftEdge.Stable
    
    if ($EdgePackage) {
        Remove-AppxPackage -Package $EdgePackage.PackageFullName
        Write-Output "Microsoft Edge has been uninstalled."
    } else {
        Write-Output "Microsoft Edge is not installed."
    }
    
    # Path to the Edge Enterprise installer
    $InstallerPath = "C:\Path\To\MicrosoftEdgeEnterprise_X64_v115.0.1901.203.msi"
    
    # Install specific version of Edge Enterprise
    if (Test-Path $InstallerPath) {
        Start-Process msiexec.exe -ArgumentList "/i $InstallerPath /quiet /norestart" -Wait
        Write-Output "Microsoft Edge Enterprise version 115.0.1901.203 has been installed."
    } else {
        Write-Output "Installer not found at $InstallerPath."
    }
    
    


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.