Added winget uninstall of Copilot. Line 968 Remove-AppxPackage is not working when Copilot is installed back after Windows Updates and the only option that works is using winget (#4797)

Co-authored-by: gepardjaro <192244662+gepardjaro@users.noreply.github.com>
This commit is contained in:
Chris Titus
2026-07-02 13:28:57 -05:00
committed by GitHub
co-authored by gepardjaro
parent de6652adc0
commit 299b68e82d
+1
View File
@@ -913,6 +913,7 @@
New-Item \"HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Appx\\AppxAllUserStore\\EndOfLife\\$Sid\\$Appx\" -Force
Get-AppxPackage -AllUsers \"*Copilot*\" | Remove-AppxPackage -AllUsers
winget uninstall -e --name \"Copilot\" --silent --force --accept-source-agreements 2>$null
Get-AppxPackage -AllUsers Microsoft.MicrosoftOfficeHub | Remove-AppxPackage -AllUsers
if ($Appx) {