Files
winutil/functions/public/Invoke-WinUtilRemoveEdge.ps1
Gabi 8e2dc21823 Update Invoke-WinUtilRemoveEdge.ps1 (#4358)
* Replce Get-ChildItem with Resolve-Path inside of Invoke-WinUtilRemoveEdge.ps1

* Update Invoke-WinUtilRemoveEdge.ps1

* Update Invoke-WinUtilRemoveEdge.ps1
2026-04-14 11:03:07 -05:00

9 lines
458 B
PowerShell

function Invoke-WinUtilRemoveEdge {
New-Item -Path "$Env:SystemRoot\SystemApps\Microsoft.MicrosoftEdge_8wekyb3d8bbwe\MicrosoftEdge.exe" -Force
$Path = Resolve-Path -Path "$Env:ProgramFiles (x86)\Microsoft\Edge\Application\*\Installer\setup.exe" | Select-Object -Last 1
Start-Process -FilePath $Path -ArgumentList '--uninstall --system-level --force-uninstall --delete-profile' -Wait
Write-Host "Microsoft Edge was removed" -ForegroundColor Green
}