How to Uninstall Microsoft Edge Using PowerShell?

In this tutorial, I will explain how to uninstall Microsoft Edge using PowerShell. If you want to remove Microsoft Edge from your Windows 10 or Windows 11 system, this step-by-step guide will help you do that. I recently did this for my organization.

Uninstall Microsoft Edge Using PowerShell

Microsoft Edge is the default web browser for Windows 10 and Windows 11. While it offers a range of features and improvements over Internet Explorer, some users prefer other browsers like Google Chrome or Mozilla Firefox.

Additionally, Edge can sometimes cause system slowdowns or compatibility issues with certain applications. Uninstalling it can free up system resources and improve performance. So, PowerShell is the best option for uninstalling the Edge browser.

Before running the PowerShell script, ensure you have administrative privileges on your computer. PowerShell commands require elevated permissions to execute system-level changes.

Follow the steps to uninstall Microsoft Edge from Windows OS using PowerShell.

Step 1: Open PowerShell as Administrator

  1. Press Windows + X on your keyboard or right-click the Start button to open the Power User menu.
  2. Select Windows PowerShell (Admin) or Windows Terminal (Admin) if you’re using Windows 11.

Step 2: Find the Microsoft Edge Package

To uninstall Microsoft Edge, you need to locate its package name. This can be done using the Get-AppxPackage command.

  • In the PowerShell window, type the following command and press Enter:
Get-AppxPackage *MicrosoftEdge*
  • This command will list all the packages related to Microsoft Edge installed on your system. Look for the package name under the Name field. It should look something like Microsoft.MicrosoftEdge.Stable.

You can see the screenshot below for your reference.

Uninstall Microsoft Edge Using PowerShell

Check out How to Set Proxy in PowerShell?

Step 3: Uninstall Microsoft Edge

Once you have identified the package name, you can proceed to uninstall it.

  • In the PowerShell window, type the following command, replacing PackageFullName with the actual package name you found in the previous step:
Get-AppxPackage -allusers Microsoft.MicrosoftEdge.Stable | Remove-AppxPackage
  • Press Enter. This command will remove Microsoft Edge from your system.

This is how to remove the Edge browser from your system using PowerShell.

Read Get Window Titles Using PowerShell

Troubleshooting Common Issues

Now, let me show you some common issues you may face here.

Issue 1: Access Denied

If you encounter an “Access Denied” error, ensure you are running PowerShell as an administrator. Right-click the Start button, select Windows PowerShell (Admin), and try the commands again.

Issue 2: Package Not Found

If the package name is not found, double-check the output of the Get-AppxPackage *MicrosoftEdge* command. Ensure you are copying the correct package name and that it matches exactly.

Issue 3: Reinstallation

If you need to reinstall Microsoft Edge for any reason, you can download it from the official Microsoft Edge website.

Automate PowerShell Scripts to Uninstall Microsoft Edge

You can also create a PowerShell script to automate the uninstallation process. Here’s an example script:

# Uninstall Microsoft Edge
$EdgePackage = Get-AppxPackage -allusers Microsoft.MicrosoftEdge.Stable
Remove-AppxPackage -Package $EdgePackage.PackageFullName

Save this script as UninstallEdge.ps1 and run it using PowerShell:

.\UninstallEdge.ps1

Read Get Windows Services Using PowerShell

Prevent Edge from Reinstall Microsoft Edge

Windows updates may reinstall Microsoft Edge. To prevent this, you can use Group Policy Editor (Windows 10 Pro and Enterprise) or modify the registry (Windows 10 Home).

Using Group Policy Editor

  1. Press Windows + R, type gpedit.msc, and press Enter.
  2. Navigate to Computer Configuration > Administrative Templates > Windows Components > Microsoft Edge.
  3. Double-click Allow Microsoft Edge to pre-launch at Windows startup, when the system is idle, and each time Microsoft Edge is closed.
  4. Select Disabled and click OK.

Modifying the Registry

  1. Press Windows + R, type regedit, and press Enter.
  2. Navigate to HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\MicrosoftEdge\Main.
  3. Right-click the Main key, select New > DWORD (32-bit) Value, and name it AllowPrelaunch.
  4. Set the value to 0.

If you do this, Windows update will not reinstall Microsoft Edge in your system.

Conclusion

In this tutorial, I explained how to uninstall Microsoft Edge using PowerShell from Windows 10 or Windows 11.

You may also like:

100 PowerShell cmdlets download free

100 POWERSHELL CMDLETS E-BOOK

FREE Download an eBook that contains 100 PowerShell cmdlets with complete script and examples.