Files
winutil/functions/public/Invoke-WinUtilRemoveEdge.ps1
T

9 lines
460 B
PowerShell
Raw Normal View History

2026-01-27 21:11:30 +02:00
function Invoke-WinUtilRemoveEdge {
2026-04-02 13:24:18 -07:00
$Path = Get-ChildItem -Path "$Env:ProgramFiles (x86)\Microsoft\Edge\Application\*\Installer\setup.exe" | Select-Object -First 1
2026-04-02 15:30:12 -05:00
2026-04-02 13:24:18 -07:00
New-Item -Path "$Env:SystemRoot\SystemApps\Microsoft.MicrosoftEdge_8wekyb3d8bbwe\MicrosoftEdge.exe" -Force
Start-Process -FilePath $Path -ArgumentList '--uninstall --system-level --force-uninstall --delete-profile' -Wait
2026-01-27 21:11:30 +02:00
2026-04-02 13:24:18 -07:00
Write-Host "Microsoft Edge was removed" -ForegroundColor Green
2026-01-27 21:11:30 +02:00
}