winutil
winutil copied to clipboard
Add option to remove Microsoft Copilot AI
I added the function to Remove the Microsoft Copilot AI. Besides some small problematic updates it was straightforward. Works on 23H2 build 22631.3447.
EDIT: just wondering about your approach of removing Copilot, which's why remove it entirely? looking online and I've found a Registry Hack to turn Copilot off, so removing Copilot entirely using
Remove-AppxPackage
is rather an interesting approach.
My intention was to do a complete removal for privacy but I do plan adding an option for a disable in addition to removing later on.
Have experienced problems, converting to draft
Does the following code do anything?
if((Test-Path -LiteralPath "HKCU:\SOFTWARE\Policies\Microsoft\Windows\WindowsCopilot") -ne $true) { New-Item "HKCU:\SOFTWARE\Policies\Microsoft\Windows\WindowsCopilot" -force -ea SilentlyContinue };
New-ItemProperty -LiteralPath 'HKCU:\SOFTWARE\Policies\Microsoft\Windows\WindowsCopilot' -Name 'TurnOffWindowsCopilot' -Value 1 -PropertyType DWord -Force -ea SilentlyContinue;
You might also reference this reg edit via Set-ItemProperty to disable copilot so windows won't refer to something that isn't there:
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Policies\Microsoft\Windows\WindowsCopilot]
"TurnOffWindowsCopilot"=-
[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsCopilot]
"TurnOffWindowsCopilot"=-
Does the following code do anything?
if((Test-Path -LiteralPath "HKCU:\SOFTWARE\Policies\Microsoft\Windows\WindowsCopilot") -ne $true) { New-Item "HKCU:\SOFTWARE\Policies\Microsoft\Windows\WindowsCopilot" -force -ea SilentlyContinue }; New-ItemProperty -LiteralPath 'HKCU:\SOFTWARE\Policies\Microsoft\Windows\WindowsCopilot' -Name 'TurnOffWindowsCopilot' -Value 1 -PropertyType DWord -Force -ea SilentlyContinue;
I'd use this code AND also add HKLM as well so it disables user and machine level.
I'd use this code AND also add HKLM as well so it disables user and machine level.
Haven't found this policy on group policy editor for Computer Configuration
, only for User Configuration
so I am not sure about your suggestion...
So this is what happened:
After running tweaks in my testing and manually turning on Copilot in settings the icon didn’t appear so I made the PR. Then after opening PR I ran a security update and rebooted my computer after that is saw the Copilot icon and somehow when I pressed it it opened, the weird thing is that it still doesn’t show up in the settings app list, and doesn’t show up when running Get-AppxPackage
I have a few theories on what happend.
- The security update partially reinstalled Copilot but didn’t install the metadata for it to show up in settings.
- There actually are lots of protections for Copilot specifically Windows uninstalls Copilot in RAM but when I rebooted and Windows tried to actually write the deletions it failed doing that.
- The Copilot files are stored somewhere in cache/temporary file but the actual files are gone.
@ModernTTY lets push this to the next PR. I'm merging to main and this draft will be wiped out. I'm also curious to see how this performs on 24H2 as they expand Co-Pilot to infect more of Windows