Source: https://code.ravendevteam.org/talon/edge_vanisher.ps1
This PowerShell script uninstalls Microsoft Edge on Windows 11 systems and prevents it from reinstalling by applying restrictive filesystem permissions to Edge components.
Remove Microsoft Edge and its related shortcuts and files from Windows 11 environments.
Lock down Edge installation directories to enforce organizational policies against Microsoft Edge usage.
PowerShell 5.1 or later with Appx module support.
Windows 11 operating system.
Administrator privileges.
Parameter | Type | Description | Default |
---|---|---|---|
None | N/A | No configurable parameters | N/A |
powershell -ExecutionPolicy Bypass -File edge_vanisher.ps1
The script verifies administrator rights, terminates running Microsoft Edge processes, uninstalls the Edge Appx package for the current user, deletes associated shortcuts and installation folders, and then applies deny access control entries to key Edge directories to prevent reinstallation.
Uses Try/Catch blocks around filesystem and ACL operations with -ErrorAction Stop for critical commands, logging error details to the host. Non-critical removals use -ErrorAction SilentlyContinue with post-action checks.
Must be run with elevated privileges. Improper ACL modifications can affect future updates or other applications. No external inputs are accepted, so input sanitization is not required.
Employs Write-Host with color-coded output: Yellow for progress, Cyan for operations, Green for success messages, and Red for errors.
Test in a non-production or VM environment; verify Edge removal and ACL protection using commands like Get-AppxPackage Microsoft.MicrosoftEdge and attempt reinstall.
Author: Raven Development Team