From 7f105a58bbbeba023f287c83a98031570e54a324 Mon Sep 17 00:00:00 2001 From: Gabi <218829269+GabiNun2@users.noreply.github.com> Date: Thu, 2 Apr 2026 13:24:18 -0700 Subject: [PATCH] Update Invoke-WinUtilRemoveEdge.ps1 (#4291) * Update Invoke-WinUtilRemoveEdge.ps1 * Update Invoke-WinUtilRemoveEdge.ps1 * Merge branch 'ChrisTitusTech:main' into patch-12 --- functions/public/Invoke-WinUtilRemoveEdge.ps1 | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/functions/public/Invoke-WinUtilRemoveEdge.ps1 b/functions/public/Invoke-WinUtilRemoveEdge.ps1 index a153730a..173afe9f 100644 --- a/functions/public/Invoke-WinUtilRemoveEdge.ps1 +++ b/functions/public/Invoke-WinUtilRemoveEdge.ps1 @@ -1,7 +1,8 @@ function Invoke-WinUtilRemoveEdge { - Write-Host "Unlocking The Offical Edge Uninstaller And Removing Microsoft Edge..." + $Path = Get-ChildItem -Path "$Env:ProgramFiles (x86)\Microsoft\Edge\Application\*\Installer\setup.exe" | Select-Object -First 1 + + 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 - $Path = (Get-ChildItem "C:\Program Files (x86)\Microsoft\Edge\Application\*\Installer\setup.exe")[0].FullName - New-Item "C:\Windows\SystemApps\Microsoft.MicrosoftEdge_8wekyb3d8bbwe\MicrosoftEdge.exe" -Force - Start-Process $Path -ArgumentList '--uninstall --system-level --force-uninstall --delete-profile' + Write-Host "Microsoft Edge was removed" -ForegroundColor Green }