From 8c970d91609bfb2e7ab48f05672f7b1efa827f1d Mon Sep 17 00:00:00 2001 From: zoicware <118035521+zoicware@users.noreply.github.com> Date: Sun, 17 Nov 2024 22:15:47 -0500 Subject: [PATCH] Remove Additional Installers --- RemoveAi.ps1 | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/RemoveAi.ps1 b/RemoveAi.ps1 index bd0ffe7..ee11868 100644 --- a/RemoveAi.ps1 +++ b/RemoveAi.ps1 @@ -149,6 +149,17 @@ foreach ($folder in $folders) { if ($fullPath -ne $null) { Remove-Item -Path $fullPath -Recurse -Force -ErrorAction SilentlyContinue } } + +#remove additional installers +$inboxapps = 'C:\Windows\InboxApps' +$installers = Get-ChildItem -Path $inboxapps -Filter '*Copilot*' +foreach ($installer in $installers) { + takeown /f $installer.FullName *>$null + icacls $installer.FullName /grant administrators:F /t *>$null + Remove-Item -Path $installer.FullName -Force +} + + #remove any screenshots from recall Write-Host 'Removing Any Screenshots...' Remove-Item -Path "$env:LOCALAPPDATA\CoreAIPlatform*" -Force -Recurse -ErrorAction SilentlyContinue