How can I uninstall default edge on windows 10?

Het Desai 0 Reputation points

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

Microsoft Edge
Microsoft Edge
A Microsoft cross-platform web browser that provides privacy, learning, and accessibility tools.
2,211 questions
Windows 10
Windows 10
A Microsoft operating system that runs on personal computers and tablets.
11,001 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. S.Sengupta 16,571 Reputation points MVP

    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."