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

9 lines
458 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
New-Item -Path "$Env:SystemRoot\SystemApps\Microsoft.MicrosoftEdge_8wekyb3d8bbwe\MicrosoftEdge.exe" -Force
2026-04-14 19:03:07 +03:00
$Path = Resolve-Path -Path "$Env:ProgramFiles (x86)\Microsoft\Edge\Application\*\Installer\setup.exe" | Select-Object -Last 1
2026-04-02 13:24:18 -07:00
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
}