Updated May 2023 – The script is now multi-language so can be deployed to an OS in any Windows supported language and should work the same
Update – The script is now code signed for extra security
One complaint I often hear about using straight OOBE autopilot is around the bloatware, either manufacturer installed (McAfee trials anyone?) or the Microsoft stuff, after all, who needs Xbox Gaming bar on an enterprise machine?
One option is to take the machine and drop on a fresh ISO, add the autopilot hash (or inject the JSON) and then remove the Microsoft apps via Store for Business and uninstall assignments. This of course works well, but it’s effort and also means you can’t ship straight from the manufacturer unless you also send a USB stick with something like the excellent OSD Cloud from David Segura (which I would strongly recommend for “it’s dead, Jim,” rebuilds.
I, personally, prefer to embrace the future and go all out Autopilot, ship straight to your users and let Intune sort the rest which obviously pushes me down the scripting route. There are plenty of scripts out there, but none quite ticked all of the boxes, I wanted something that would remove all MS apps without me having to mess with the store, manufacturer bloat and anything else which might have crept on.
I then saw this post from Ben Whitmore and decided I wanted it to be self-updating too.
So, here is my BloatWare removal script:
https://github.com/andrew-s-taylor/public/tree/main/De-Bloat
In this folder you will find the script to remove the bloat, the script to deploy it and also a script if you want to deploy as an application (as well as the IntuneWin file)
De-Bloat Script
Let’s start with the script itself, it will:
- Remove AppX Packages (listed)
- Remove associated reg keys
- Disable Windows Feedback
- Removes Cortana from Search
- Removes Web Results from search
- Disables Wi-Fi Sense
- Disables Live Tiles
- Removes unwanted scheduled tasks (Xbox Live etc.)
- Removes Windows 11 specific apps (Teams Chat for example)
- Clears start menu
- Disables the hidden surfing game in Edge
- Removes Dell, HP and Lenovo specific bloat (by detecting manufacturer and deploying appropriately)
- Removes McAfee (if detected)
- Removes any Win32 apps which aren’t Intune, Windows Update or MS Edge
- Removes Chrome
- Removes Windows Copilot
- Removes Windows Backup (win10 only)
I know some of you may be looking at the last two options and worrying about the current estate if you deploy site-wide, but I have you covered. The Win32 app removal part will only run if NO apps have been deployed via Intune. If it detects any installations, it will just skip that bit.
The full script will report back to a log file here:
C:\ProgramData\Debloat\Debloat.log
Intune Script Deployment
My suggestion is to deploy as a device script in Intune, that way it will run prior to any apps installing and you will have the full experience. This is where the secondary script comes in. This will grab the latest copy of the de-bloat script, copy it to the machine and run locally. It’s quicker and means you can always be sure devices are running the latest version without constantly replacing scripts:
NOTE: Run in the 64-bit context
$DebloatFolder = "C:\ProgramData\Debloat"
If (Test-Path $DebloatFolder) {
Write-Output "$DebloatFolder exists. Skipping."
}
Else {
Write-Output "The folder '$DebloatFolder' doesn't exist. This folder will be used for storing logs created after the script runs. Creating now."
Start-Sleep 1
New-Item -Path "$DebloatFolder" -ItemType Directory
Write-Output "The folder $DebloatFolder was successfully created."
}
$templateFilePath = "C:\ProgramData\Debloat\removebloat.ps1"
Invoke-WebRequest `
-Uri "https://raw.githubusercontent.com/andrew-s-taylor/public/main/De-Bloat/RemoveBloat.ps1" `
-OutFile $templateFilePath `
-UseBasicParsing `
-Headers @{"Cache-Control"="no-cache"}
invoke-expression -Command $templateFilePath
Intune Application Deployment
If you would prefer to deploy as an application, you can either grab the Intunewin file and use the following commands:
Install:
powershell -executionpolicy bypass -file debloat-intune-script.ps1
Uninstall (obviously not an option, so a dead command)
cmd.exe /c
Detection:
C:\ProgramData\Debloat\Debloat.log
OR
If you want to be extra lazy, run this script:
Deploy-DeBloat-Application.ps1
Which will download the file and setup the application for you
Happy de-bloating!
Just a question but are you having this run just once per device/user when using Intune? If we later push Chrome down to a PC will this come behind that and uninstall it?
Yes, I deploy as a platform script assigned to a Device group so it runs during “Detecting Apps” in ESP. It also has logic so the Win32 bits won’t run if it’s not in OOBE
This solution seems like what I need to remove bloatware, but I think i’m out of my league on how to run it. I’ve download each of the github raw files into my download folder, but i dont know what the next steps are.
thanks!
Hi,
You have two options:
1) Deploy the removebloat script as a platform script (64-bit, system context). Keep in mind you may need to replace the script as I updated it, if the updates are relevant to you
2) Deploy the debloat-intune-script as a platform script (64-bit, system context). This one downloads the latest version to the machine on launch so it keeps itself updated on new devices.
Either do the same thing, it depends if you would rather have full control, or something a bit more automated
I will be editing the script for testing purposes. This can be ran outside of intune and ran on the device itself?
Yes, it will work fine run manually
New to scripts…..In PowerShell with Admin privileges, I’m getting the following errors when I run .\Deploy-DeBloat-Application.ps1
At D:\OneDrive\Downloads\Windows DeBloat\Deploy-DeBloat-Application.ps1:42 char:247
+ … script type=”application/json” id=”client-env”>{“locale”:”en”,”featur …
+ ~~~~~
Unexpected token ‘:”en”‘ in expression or statement.
At D:\OneDrive\Downloads\Windows DeBloat\Deploy-DeBloat-Application.ps1:42 char:252
+ … cript type=”application/json” id=”client-env”>{“locale”:”en”,”feature …
+ ~
Missing argument in parameter list.
At D:\OneDrive\Downloads\Windows DeBloat\Deploy-DeBloat-Application.ps1:42 char:941
+ … ite_metered_billing_update”,”lifecycle_label_name_updates”]}
+ ~
The ‘{“props”:{“docsUr …
+ ~
Unexpected token ‘:’ in expression or statement.
At D:\OneDrive\Downloads\Windows DeBloat\Deploy-DeBloat-Application.ps1:239 char:95
+ … “:{“docsUrl”:”https://docs.github.com/get-started/accessibility/keybo …
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Unexpected token ‘:”https://docs.github.com/get-started/accessibility/keyboard-shortcuts”‘ in expression or statement.
At D:\OneDrive\Downloads\Windows DeBloat\Deploy-DeBloat-Application.ps1:239 char:168
+ … s.github.com/get-started/accessibility/keyboard-shortcuts”}}
+ ~
The ‘ <span cla …
+ ~
The '<' operator is reserved for future use.
At D:\OneDrive\Downloads\Windows DeBloat\Deploy-DeBloat-Application.ps1:307 char:49
+
+ ~
Missing file specification after redirection operator.
At D:\OneDrive\Downloads\Windows DeBloat\Deploy-DeBloat-Application.ps1:576 char:14
+
+ ~
The ‘<' operator is reserved for future use.
At D:\OneDrive\Downloads\Windows DeBloat\Deploy-DeBloat-Application.ps1:692 char:49
+
+ ~
Missing file specification after redirection operator.
Not all parse errors were reported. Correct the reported errors and try again.
+ CategoryInfo : ParserError: (:) [], ParseException
+ FullyQualifiedErrorId : UnexpectedToken
Make sure you are grabbing the raw file from github, those errors look like you have just copied everything in the browser window
That was it.
My Bad.
Thanks
Never mind, I just read the names again and realised they’re different packages.
Glad you sorted it, they are precise matches so we don’t remove the wrong thing 🙂
It looks like the whitelist to stop the script from removing dell packages etc isn’t working. The script removed dell packages from my machine.
Detecting Manufacturer
Dell detected
Provisioned package for Dell Optimizer not found.
Dell Optimizer not found.
Uninstalling: Dell Optimizer
PS>TerminatingError(Start-Process): “This command cannot be run due to the error: The system cannot find the file specified.”
Uninstalled: Dell Optimizer
-ForegroundColor
Green
Provisioned package for Dell Power Manager not found.
Dell Power Manager not found.
Provisioned package for DellOptimizerUI not found.
DellOptimizerUI not found.
Uninstalling: DellOptimizerUI
PS>TerminatingError(Start-Process): “This command cannot be run due to the error: The system cannot find the file specified.”
Uninstalled: DellOptimizerUI
-ForegroundColor
Green
Provisioned package for Dell SupportAssist OS Recovery not found.
Dell SupportAssist OS Recovery not found.
Provisioned package for Dell SupportAssist not found.
Dell SupportAssist not found.
Uninstalling: Dell SupportAssist
PS>TerminatingError(Start-Process): “This command cannot be run due to the error: The system cannot find the file specified.”
Uninstalled: Dell SupportAssist
-ForegroundColor
Green
Provisioned package for Dell Optimizer Service not found.
Dell Optimizer Service not found.
Provisioned package for DellInc.PartnerPromo not found.
DellInc.PartnerPromo not found.
Path :
Online : True
Removed provisioned package for DellInc.DellOptimizer.
Removed DellInc.DellOptimizer.
Path :
Online : True
Removed provisioned package for DellInc.DellCommandUpdate.
Removed DellInc.DellCommandUpdate.
Provisioned package for DellInc.DellPowerManager not found.
DellInc.DellPowerManager not found.
Path :
Online : True
Removed provisioned package for DellInc.DellDigitalDelivery.
Removed DellInc.DellDigitalDelivery.
Path :
Online : True
Removed provisioned package for DellInc.DellSupportAssistforPCs.
Removed DellInc.DellSupportAssistforPCs.
Provisioned package for DellInc.PartnerPromo not found.
DellInc.PartnerPromo not found.
Provisioned package for Dell Command | Update not found.
Dell Command | Update not found.
Provisioned package for Dell Command | Update for Windows Universal not found.
Dell Command | Update for Windows Universal not found.
Uninstalling: Dell Command | Update for Windows Universal
PS>TerminatingError(Start-Process): “This command cannot be run due to the error: The system cannot find the file specified.”
Uninstalled: Dell Command | Update for Windows Universal
-ForegroundColor
Green
Provisioned package for Dell Command | Update for Windows 10 not found.
Dell Command | Update for Windows 10 not found.
Provisioned package for Dell Command | Power Manager not found.
Dell Command | Power Manager not found.
Provisioned package for Dell Digital Delivery Service not found.
Dell Digital Delivery Service not found.
Provisioned package for Dell Digital Delivery not found.
Dell Digital Delivery not found.
Provisioned package for Dell Power Manager Service not found.
Dell Power Manager Service not found.
Provisioned package for SupportAssist Recovery Assistant not found.
SupportAssist Recovery Assistant not found.
Provisioned package for Dell SupportAssistAgent not found.
Dell SupportAssistAgent not found.
Provisioned package for Dell Update – SupportAssist Update Plugin not found.
Dell Update – SupportAssist Update Plugin not found.
Provisioned package for Dell Core Services not found.
Dell Core Services not found.
Uninstalling: Dell Core Services
PS>TerminatingError(Start-Process): “This command cannot be run due to the error: The system cannot find the file specified.”
Uninstalled: Dell Core Services
-ForegroundColor
Green
Provisioned package for Dell Update – SupportAssist Update Plugin not found.
Dell Update – SupportAssist Update Plugin not found.
Provisioned package for DellInc.PartnerPromo not found.
DellInc.PartnerPromo not found.
Removing Dell Optimizer
ReturnValue : 0
PSComputerName :
Removing Dell Power Manager
Removing DellOptimizerUI
Also – we found that Office is not uninstalling/running unless copying the office section apart in a seperate script. Is office uninstallation depending on running in OOBE?
Best regards Daniel
Yes, Office is only during OOBE
Thanks for the update!
Unfortunately we got issues downloading the odt.exe-file. Debloat.log gives:
TerminatingError(Invoke.Webrequest): The underlying connection was closed: Failed to maintain a trust relationship for the secure SSL/TLS channel. (Translated from swedish).
If we run the Office-uninstallationscript seperatly outside OOBE it works well.
We do not find any blocked traffic by firewall. I could include the odt-file in the intunewin-file and add a copy-item to deal with that. A little more bytes for the clients to download even if they were running the application outside OOBE.
Not a major issue for us but maybee others might faced this issue.
Great script! Thanks for sharing!
Regards Daniel
Thanks for the feedback, it’s grabbing direct from GitHub which I would expect would be secure, but I’ll keep an eye in case others have the same issue. I could move it to blob storage as an alternative
Glad the HP apps are working as well!
Thanks for the script! We do have issues uninstalling following:
HP Notifications – Cant find the file
AD2F1837.HPSupportAssistant – Not found
AD2F1837.myHP – Not found
Its Win11 24h2 running on HP EliteBook 640 G11
Best regards Daniel
Are the apps still present after running the script or missing altogether?
Hi!
Yes they are still present after script runs.
Can you send me a list of all appxpackages on the machine and the Uninstall keys in the registry (x64 and 32) and I’ll see what needs updating
Get-AppxPackage -AllUsers
#TYPE Selected.Microsoft.Windows.Appx.PackageManager.Commands.AppxPackage
“Name”
“Microsoft.MicrosoftEdge.Stable”
“1527c705-839a-4832-9118-54d4Bd6a0c89”
“c5e2524a-ea46-4f67-841f-6a9465d9d515”
“E2A4F912-2574-4A75-9BB0-0D023378592B”
“F46D4000-FD22-4DB4-AC8E-4E1DDDE828FE”
“Microsoft.AAD.BrokerPlugin”
“Microsoft.AccountsControl”
“Microsoft.AsyncTextService”
“Microsoft.BioEnrollment”
“Microsoft.CredDialogHost”
“Microsoft.ECApp”
“Microsoft.LockApp”
“Microsoft.MicrosoftEdgeDevToolsClient”
“Microsoft.UI.Xaml.CBS”
“Microsoft.Win32WebViewHost”
“Microsoft.Windows.Apprep.ChxApp”
“Microsoft.Windows.AssignedAccessLockApp”
“Microsoft.Windows.AugLoop.CBS”
“Microsoft.Windows.CapturePicker”
“Microsoft.Windows.CloudExperienceHost”
“Microsoft.Windows.ContentDeliveryManager”
“Microsoft.Windows.NarratorQuickStart”
“Microsoft.Windows.OOBENetworkCaptivePortal”
“Microsoft.Windows.OOBENetworkConnectionFlow”
“Microsoft.Windows.ParentalControls”
“Microsoft.Windows.PeopleExperienceHost”
“Microsoft.Windows.PinningConfirmationDialog”
“Microsoft.Windows.PrintQueueActionCenter”
“Microsoft.Windows.SecureAssessmentBrowser”
“Microsoft.Windows.ShellExperienceHost”
“Microsoft.Windows.StartMenuExperienceHost”
“Microsoft.Windows.XGpuEjectDialog”
“Microsoft.WindowsAppRuntime.CBS”
“Microsoft.XboxGameCallableUI”
“MicrosoftWindows.Client.AIX”
“MicrosoftWindows.Client.CBS”
“MicrosoftWindows.Client.Core”
“MicrosoftWindows.Client.FileExp”
“MicrosoftWindows.Client.OOBE”
“MicrosoftWindows.Client.Photon”
“MicrosoftWindows.UndockedDevKit”
“NcsiUwpApp”
“Windows.CBSPreview”
“windows.immersivecontrolpanel”
“Windows.PrintDialog”
“Microsoft.WindowsAppRuntime.1.3”
“Microsoft.VCLibs.140.00”
“Microsoft.VCLibs.140.00”
“Microsoft.VCLibs.140.00”
“Microsoft.VCLibs.140.00”
“Microsoft.VCLibs.140.00”
“Microsoft.VCLibs.140.00”
“Microsoft.VCLibs.140.00.UWPDesktop”
“Microsoft.VCLibs.140.00.UWPDesktop”
“Microsoft.UI.Xaml.2.8”
“Microsoft.UI.Xaml.2.8”
“Microsoft.NET.Native.Runtime.2.2”
“Microsoft.NET.Native.Runtime.2.2”
“Microsoft.NET.Native.Framework.2.2”
“Microsoft.NET.Native.Framework.2.2”
“Clipchamp.Clipchamp”
“Microsoft.ApplicationCompatibilityEnhancements”
“Microsoft.AVCEncoderVideoExtension”
“Microsoft.DesktopAppInstaller”
“Microsoft.HEIFImageExtension”
“Microsoft.MicrosoftStickyNotes”
“Microsoft.OutlookForWindows”
“Microsoft.Paint”
“Microsoft.RawImageExtension”
“Microsoft.ScreenSketch”
“Microsoft.SecHealthUI”
“Microsoft.Services.Store.Engagement”
“Microsoft.Services.Store.Engagement”
“Microsoft.StorePurchaseApp”
“Microsoft.VP9VideoExtensions”
“Microsoft.WebMediaExtensions”
“Microsoft.WebpImageExtension”
“Microsoft.Windows.Photos”
“Microsoft.WindowsAlarms”
“Microsoft.WindowsAppRuntime.1.4”
“Microsoft.WindowsAppRuntime.1.4”
“Microsoft.WindowsCalculator”
“Microsoft.WindowsCamera”
“Microsoft.WindowsNotepad”
“Microsoft.WindowsStore”
“Microsoft.WindowsTerminal”
“Microsoft.YourPhone”
“MicrosoftCorporationII.QuickAssist”
“MicrosoftWindows.Client.WebExperience”
“MSTeams”
“AD2F1837.HPSupportAssistant”
“Microsoft.NET.Native.Runtime.1.4”
“Microsoft.NET.Native.Runtime.1.4”
“Microsoft.NET.Native.Framework.1.3”
“Microsoft.NET.Native.Framework.1.3”
“AppUp.IntelManagementandSecurityStatus”
“RealtekSemiconductorCorp.HPAudioControl”
“AppUp.IntelGraphicsExperience”
“AD2F1837.HPSystemInformation”
“AD2F1837.HPPCHardwareDiagnosticsWindows”
“AD2F1837.HPPrivacySettings”
“AD2F1837.myHP”
“AD2F1837.myHP”
“Microsoft.UI.Xaml.2.7”
“Microsoft.UI.Xaml.2.7”
“Microsoft.WindowsAppRuntime.1.5”
“Microsoft.WindowsAppRuntime.1.5”
“Microsoft.Copilot”
“Microsoft.CompanyPortal”
“Microsoft.SurfaceWirelessDisplayAdapter”
“Microsoft.UI.Xaml.2.3”
“Microsoft.UI.Xaml.2.3”
“Microsoft.LanguageExperiencePacksv-SE”
In the registry there is no listing for those applications.
Note – we are whitelisting some HP applications.
‘Poly Lens’, #Tillagd
‘HP Client Security Manager’, #Tillagd
‘HP Security Update Service’, #Tillagd
‘HP System Default Settings’, #Tillagd
‘HP Wolf Security’, #Tillagd
‘HP Wolf Security Application Support for Sure Sense’, #Tillagd
‘HP Wolf Security Application Support for Windows’, #Tillagd
‘AD2F1837.HPPCHardwareDiagnosticsWindows’, #Tillagd
‘AD2F1837.HPPowerManager’, #Tillagd
‘AD2F1837.HPPrivacySettings’, #Tillagd
‘AD2F1837.HPQuickDrop’, #Tillagd
‘AD2F1837.HPSystemInformation’, #Tillagd
‘RealtekSemiconductorCorp.HPAudioControl’, #Tillagd
‘HP Sure Recover’, #Tillagd
‘HP Sure Run Module’, #Tillagd
‘RealtekSemiconductorCorp.HPAudioControl_2.39.280.0_x64__dt26b99r8h8gj’, #Tillagd
‘HP Wolf Security – Console’, #Tillagd
‘HP Wolf Security Application Support for Chrome 122.0.6261.139’, #Tillagd
‘Windows Driver Package – HP Inc. sselam_4_4_2_453 AntiVirus (11/01/2022 4.4.2.453)’ #Tillagd
Output in Deblot.log:
Detecting Manufacturer
HP detected
Provisioned package for HP Notifications not found.
HP Notifications not found.
Uninstalling: HP Notifications
PS>TerminatingError(Start-Process): “This command cannot be run due to the error: Det går inte att hitta filen.”
Uninstalled: HP Notifications
-ForegroundColor
Green
Uninstalling: HP Notifications
PS>TerminatingError(Start-Process): “This command cannot be run due to the error: Det går inte att hitta filen.”
Uninstalled: HP Notifications
-ForegroundColor
Green
Path :
Online : True
Removed provisioned package for AD2F1837.HPSupportAssistant.
AD2F1837.HPSupportAssistant not found.
Path :
Online : True
Removed provisioned package for AD2F1837.myHP.
AD2F1837.myHP not found.
Can you try without a whitelist and see if that makes any difference? The app names match what are in the script so the issue isn’t anything obvious
Hi!
There is no reply button on the last post so I reply here 🙂
I have been commenting out all HP software except HP Notification, AD2F1837.HPSupportAssistant and AD2F1837.myHP
In row 1356 $InstalledPrograms = $allstring | where……..
One issue might be that the paramater/array of $allstrings does not include AD2F1837.HPSupportAssistant and AD2F1837.myHP as there is no uninstall string present for those.
I really cant tell. We tried Jereons script https://gist.github.com/mark05e/a79221b4245962a477a49eb281d97388#file-remove-hpbloatware-ps1 . That one uninstalls those HP applications well. As for now we might have to combine or split those script together.
I think I’ve found the issue, can you try the version I’ve just uploaded
Thanks!
I think it might be working now. Tried reinstalling some HP applications and those we want to get rid of is uninstalled. I need to unbox a new laptop to make sure.
Many thanks!
Do you know if it’s possible to remove the Chat Icon and Task view from the Taskbar?
Yes, I normally configure those via an Intune policy, but you could set the registry key via a script if you wanted
When running the script, I’m seeing the following error in the debloat.log:
Removing Windows Backup
PS>TerminatingError(Remove-WindowsPackage): “The specified package is not valid Windows package.”
Is that on Windows 10?
Thanks for this amazing script. Unfortunately I seem to be having issues getting it to work, as I keep getting Failed in the device status, I presume it’s something I am doing wrong as all others on here have got it working.
I have a setup a new platform script (Device > Scripts and remediations > Platform scripts)
In the script location I point to debloat-intune-script.ps1.
Set the Run this script using the logged on credentials to No.
Enforced script signature check and Run script in 64 bit to Yes.
Am I missing something?
Hi,
That sounds about right, is it creating the log file in c:\ProgramData\Debloat?
It might be it is running, but something in the script itself is sending an error code. Happy to look through the log if it has created one
Hello 🙂
The C:\ProgramData\Debloat hasn’t been created.
We have been told that there is an issue with Company Portal at the moment, would this be causing an issue do you think?
Thanks
That sounds like it is failing entirely, try changing signature check to No in case it’s that (it’s signed so should work).
If not, we might have to dig into the registry to find the recorded output
Morning Andrew,
I have ran this locally and all works like a dream, thank you 🙂
So the issue of Intune is down to the Company Portal we are having.
Thank you so much for this code!!
I’ve had this to work through InTune, but on Intune it states that it failed. But it seems that all apps have been removed.
If I add the log file here are you happy to see if there’s an error please?
Yes, or you can email it over, whatever is easiest for you (firstname.surname@domain)
Hi Andrew,
Script worked after testing, I want to be able to edit the script to not uninstall Quick Assist and Microsoft Remote Desktop (I use these products), then I want to figure out how I can uninstall Outlook (new) and Teams (personal). Is there a way you may be able to help me with that in the script?
New Outlook is an AppX package so you just need to add that to the bloat list. It should be the same with personal Teams, but sometimes you need to tweak the registry to stop it coming back:
https://andrewstaylor.com/2023/02/10/removing-teams-chat-from-windows-11-via-powershell-and-intune/
Thanks!
I was able to get Personal teams to uninstall with someone else script. I edited the RemoveBloat.ps1 script and I want to deploy that as a Win32. I edited the ps1, would I use the exact same Detection Rule?
Rule – File
Path – C:\ProgramData\Debloat\Debloat.log
File or folder – Debloat.log
Detection Method – File or folder exists
?
Yes, that would work. Just check it completes quickly enough and doesn’t clash with anything else
One more question, those this only work in OOBE?, every time I run it through Company Portal, it installs but nothing happens.
No, it should work at any time. I would suggest checking the logs
Hi Andrew,
This is a great script that I am testing on my tenant. Quick question that I am a bit confused about when it comes to the detection rule.
Are you doing “Manually configured detection rules”? If so, are you doing “File”? As it isn’t specify in your description on how you did it just says “C:\ProgramData\Debloat\Debloat.log” if it is “File” then the path would be your detection? And “File or Folder” would be “Debloat.log”? and “Detection method” would be “File or folder exists”?
Also, another question, your Intunewin file has the ps1 script that removes the bloatware with it as well?
Thanks,
Ranhyer
Hi,
I would normally suggest using a platform script so it runs earlier and catches Office and Chrome.
If you want to deploy as an app, you can just use the log file path, but there is the risk it marks as complete before the script has finished executing so it might be better to use a custom detection script and read the log file for the completion message.
The Intunewin is just the deploy script, not the removebloat one
Hi Andrew again,
I have continuing having great success with the script, thank you!!!
I have a question and would appreciate some advice. I decided to start push Commercial Vantage via MS Store during autopilot, but I see the script is supposed to remove Vantage (or they have different appx names?) and I was wondering would it be possible to somehow uninstall the Com Vantage that comes with the laptop and then install my own via Intune? (assuming they have different package names)
Thank you
Hi,
The script will remove Vantage, but leave Commercial Vantage, they should be two different apps 🙂
Hiii,
Oh, yeah, I mean Commercial vantage. What if a device comes with Commercial Vantage? I have never seen it tbh, but I am curious.
Thank you
It should ignore it, the script will only remove what it’s told to (unless it goes rogue)
Any way you can add some logic to detect if any Lenovo bloat was installed via intune and skip.
We use Lenovo Commercial Vantage at work, and this is uninstalling it.
Thank you.
Just add it to the custom whitelist parameter and it will ignore it 🙂
Hi Andrew, script is great and is removing all of the HP shenanigans from our devices as part of the Autopilot process.
One issue we have is with the pre-baked O365ProPlusRetail not cleansing with script, instead it backs out as intune is detected, trying to run this to rip off baked Office in the HP OEM and then allow me to push Office from Intune with modern Teams etc but just never get’s that far. Any tips on the tweaks I need to make that happen?
Hi Dave,
I am having a nightmare with those apps, using ODT removes them, but it slows down ESP significantly. I am looking at options, but what you can do is add to your office deployment xml to remove anything pre-existing.
if anyone has tips for removing them, I’m open to any suggestions 🙂
I ran this script on a fresh Windows 10 device and noticed that whenever I search something in the taskbar, I get a white screen with a spinning icon and it eventually closes. Any idea?
It will block Cortana and web search in there, but should still search apps and docs (if there are any)
Dear Andrew,
Awesome script you made, helps me a bunch in our new environment and using Autopilot.
I was wondering two things:
Can u mabye help me adding something to the script, so that it will delete the following remaining apps?
– HP Security Update Service
– HP Documentation
Thanks a bunch! 😀
Of course, any chance you can grab the uninstall strings from the registry and I’ll get them added
Hey Andrew,
If u can help me locating them (Because I don’t know what to look for), then I will give them to you.
Dear Andrew,
I found it:
HP Documentation:
CMD /C “C:\Program Files\HP\Documentation\Doc_Uninstall.cmd”
HP Security Update Service:
MsiExec.exe /X{30CC58FD-9092-4353-BF19-F11B9EB08F2E}
They should both be removed aleady, I can see commands for both. Any chance you can send me the logs?
When I rerun the script, it does delete the HP Security Update Service but not the HP Documentation is not.
I can’t find the logs in the Debloat map in ProgramData.
Or am I looking in the wrong direction?
It should be in c:\programdata\debloat\debloat.log
Hey Andrew,
Hope u have some time. I have the logs, where can I send them too?
I also see in the script that they both are in it, yet it just doesn’t delete it… kinda weird.
If you email it to me ([email protected]) I’ll take a look
Dear Andrew,
while analyzing this (HP Security Update Service wasn’t removed during first run) I saw that the lines
##Remove Wolf Security
wmic product where name=”HP Wolf Security” call uninstall
wmic product where name=”HP Wolf Security – Console” call uninstall
wmic product where name=”HP Security Update Service” call uninstall
result in
ERROR:
Description = The request is invalid.
After combining single and double quotes it seems to work:
wmic product where “name=’HP Security Update Service'” call uninstall
I can get you a log file next time, if it helps to identify why it isn’t uninstalled the first time (Sadly, the current one was overwritten before I could save it)
I’ve just updated the script now with those updated, hopefully that fixes the issue
The device comes with Microsoft 365 in three languages. I want to have that removed as well so I can install just the en-us version. Who do I add that to be removed?
They are proving tricky to remove without slowing deployment times significantly. I am working on options, but for now you can amend your M365 apps install xml to remove anything there previously
I added the script to the Scripts and remediations>Platform scripts within Intune and assigned it to a Autopilot Group that I created. So far it has failed 3 times and not sure where in the logs to look answers. Where can I find this information.
Second question is that the above group also holds other Autopilot computers. Will this script (Once working) keep removing the bloatware each time the system restarts?
Can you send me the logs from c:\programdata\debloat please and I’ll see what’s failing.
Platform scripts only run once, but on the odd occasion where a re-run is triggered, the script has logic so it won’t remove something that doesn’t exist
That location does not exist on the laptop.
As far as the script running, in Intune, it shows the script failing and list the other devices that I do not want the program to run on.
Do you have it configured to run in the System context, 64-bit?
If the file doesn’t exist, it means the script isn’t starting at all
Ok, I fix the issue so now it runs, but where in the logs do I find what was removed?
I also want to make sure certain apps are removed and other are whitelisted.
I’ve seen comments regarding this but not sure how to proceed as I am new at this.
Sorry for all the questions.
There is a file called debloat.log which lists every app it removes
HI All,
Since yesterday the script is not finishing for me in ESP. Checked the logs today and it’s getting stuck on step when it searches for McAfee products and it stays there forever. Anybody experiencing same issue ?
Can you share the logs?
Hi Andrew,
Thanks for this script! I seem to have found a problem: when running on a Lenovo Slim 7, the script seems to kill Windows Hello facial recognition. I’ve tested this on a couple of machines, and the Hello via camera works fine until the script runs, after which it says it can’t turn on the camera for Windows Hello. Any thoughts on what might be causing this? Thanks again!
Hi,
Can you try running this and see if it fixes it?
$keypath = “HKLM:\SOFTWARE\\Microsoft\Windows Media Foundation\Platform”
$keyname = “EnableFrameServerMode”
$value = 0
if (!(Test-Path $keypath)) {
New-Item -Path $keypath -Force
}
Set-ItemProperty -Path $keypath -Name $keyname -Value $value -Type DWord -Force
$keypath2 = “HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows Media Foundation\Platform”
if (!(Test-Path $keypath2)) {
New-Item -Path $keypath2 -Force
}
Set-ItemProperty -Path $keypath2 -Name $keyname -Value $value -Type DWord -Force
If it does, let me know the output of this command and I’ll add it to the list for the key to be applied:
Get-CimInstance -ClassName Win32_ComputerSystem | Select-Object -ExpandProperty Model
I realized after I posted the above that I was running an older version of the script (from July) – so I grabbed the latest, put it into Intune, and reprovisioned the machine. This time, it didn’t break the camera. Sorry I couldn’t test the above fix, but I ran the Get-CimInstance command, and it returned:
83A4
Machine is a Lenovo Slim 7 14IRP8 in case you want to make a note.
Thanks again!
Thank you! What an amazing resource this is!
Nearly everything has worked as expected on new G11 HP laptops, there are two exceptions to this.
HP Security Update Service remains installed until the script is manually run, and in add and remove programs “Z by HP Data Science Stack Manager 1.5.3” is still present too.
Wondering if there is a way to run it twice during autopilot to make sure the removals fully kick in.
Any chance you can send the uninstall commands for the registry? I can add it as a second uninstall in the script so it effectively runs twice
Sure thing, I’ve formatted them now but will be doing another test run tomorrow. I did run it this time as an application deployment so going to try the script method instead.
Hi Andrew,
Big apologies for the delay been a busy few weeks.
HP Security Update Service
MsiExec.exe /X{BD1E4726-7D5C-4E27-B6BF-36B59F0C3708}
Z By HP Data Science Stack Manager
“C:\Program Files\HP\Z By HP Data Science Stack Manager\Uninstall Z by HP Data Science Stack Manager.exe” /allusers
There is also a quiet uninstall string for the Z app as follows…
“C:\Program Files\HP\Z By HP Data Science Stack Manager\Uninstall Z by HP Data Science Stack Manager.exe” /allusers /S
Hi Andrew,
Thanks for awsome tool, I wanted to ask You and maybe other users too….is anybody experiencing issue with Dell Command Update ? I manage it via imported ADMX and although it detects available updates and installs them after deadline. After some time Dell Client Management service fails to start and CU becomes unusable. Has nybody tested avoiding uninstallation of CU during autopilot build and keeping provided version from the image ? I’m installing version 5.3 calssic as win 32 app during AutoPilot setup but always end up with faulty service which doesn’t want to start after some time.
I’ve been testing using this script on my Dell devices, in the hope it will remove the couple of version that are shipped with the devices (which it does) to then deploy DCU classic version later in the Autopilot process. However I’m finding that the script is uninstalling my deployed version when I set it as required for the Device based autopilot group.
Script is set as a platform script. It was my understanding that this shouldn’t happen, as the script should run prior to any of the required apps being deployed?
If the script it assigned to a device group, it will run during the Discovering Apps phase of ESP which is before any win32 apps. If you are deploying Msi LOB apps, they could have installed already.
You could always add a custom whitelist for that app as well
Hi Andrew,
I have been checking the script, and it works awesome together with AutoPilot.
I do see though that McAfee keeps appearing as the AV in Windows Security, and system tray. The app is removed from add or remove programs and is nowhere to be found. The app doesn’t open either when you click it in the system tray icon. I do see two tasks running in Task Manager which I can’t kill.
Image from Task Manager: https://imgur.com/a/J0ym5bY
Log file: https://pastebin.com/tE8t1aU3
Have you encountered this before?
Thank you very much for the script. Never fails 🙂
Hi,
Looking at the log it hasn’t detected McAfee, is there anything in the Uninstall reg keys (32 and 64 bit) called McAfee? That’s the query being used to trigger the removal.
Hi,
Both locations, HKLM:\Software\WOW6432NODE\Microsoft\Windows\CurrentVersion\Uninstall and
HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall don’t have McAfee no.
The weird is that mcafee shows up as the used windows security av, but mcafee is nowhere to be found… I will update the thread (/reply) if I find sth
thank you
Running MCPR manually failed yesterday but worked today, so McAfee is gone. Really annoying.
The script does work every time though during AP and it does amazing stuff!
Thank you
McAfee is so difficult to work with, every new version leaves more behind on the devices!
I agree. Not to talk about the captcha on new mcpr… Hahahahahha
Anyway, I will do it manually via start ms-settings: while physically tagging the machine or remote later
Thank you
Hi Andrew,
Thank you for your script and effort you put into keeping it up to date.
I’ve been toying around with it and for the most. It works flawlessly. I have however; Ran into a couple of niggling points that I can’t seem to fifure out.
On most deployments, MS Teams will be uninstalled and I will have to go and re-install it again.
And, with regards to the HP debloating. Wolf security console and it’s supporting apps are not detected by your script.
Any assistance or thoughts would be most appreciated.
Hi Peter,
The new Teams app has been whitelisted on the latest version, make sure you have that one deployed.
I don’t have any HP devices for testing, but if you have the uninstall command for them, I can look to add them in
Hey Andrew!
Been looking for ways to get rid of all the Dell bloatware on our machines. I had been working on compiling a script myself before coming across this page. Does your script also remove Dell Trusted Device? A particular app I had no luck trying to uninstall via PS.
That being said, I’d love to try out your script, since it seems to to far more on cleaning up the OS beyond just Dell bloatware! Is it possible to have it only deploy during Autopilot OOBE and not run on existing devices?
Hi Jonathan,
I don’t have any Dell devices to test, but no-one has reported an app being left on the device. If it does remain though, let me know and I’ll see what I can do.
You have a few options to just run on Autopilot devices:
1) Create a new profile for autopilot, create a dynamic group pointing to it and use this for the script
2) Amend the launch script to only launch if a user account doesn’t exist
3) Package as Win32 and add a requirements script
Hey Andrew, thank you for creating and updating this script. Is it possible to remove the Lenovo bookmarks in MS Edge?
https://rahuljindalmyit.blogspot.com/2023/02/removing-oem-configured-bookmarks-from.html
Yes, I’ll need to get it working in the system context, but will add that in
Hi Andrew,
and thank you for the awesome script. After running the script, I saw that the ability to search Domain users in Windows Search got removed. I would like to keep it, but I am not certain what modifications I should do to keep this functionality 🙂
Thank you
Hi,
Glad you are finding it useful. It will be one of the reg keys between lines 527 and 553, my guess would be the second one, but worst case, just comment out/delete the lot
Thank you Andrew.
I commented both in case I want to keep Cortana.
Thank you
Btw,
I run the script on an enrolled device out of curiosity and it removed my slack and bitwarden. Not my Company Portal though. I see both slack and CP in the $whitelisted apps, so I guess I need to whitelist Slack in a different way? PS didn’t return any appxpackage about slack and bitwarden.
Thank you
Update:
I found and whitelisted Bitwarden and QuickAssist for myself. For anyone interested, please add these under whitelisted apps:
‘MicrosoftCorporationII.QuickAssist’,
‘8bitSolutionsLLC.bitwardendesktop’,
Still nth with Slack 🙂
Hello again,
Stupid question, but I guess I can add
# Delete the script file after execution
Remove-Item -Path $templateFilePath -Force
to the end of the two scripts script to delete the .ps1 later, right?
Thank you. Works perfect 🙂
Hey Andrew!
Many thanks for your great script which works very thoroughly and thus saves a ton of work.
I’ve only experienced one “problem” so far with it while testing in my Win11 Pro DELL OEM factory OS image scenario. Leveraging the script during Intune/Autopilot as a platform script as you suggested, the start menu pinned stubs for crap like LinkedIn, Spotify etc. remain in place for the first logged on user. The corresponding apps, however, are in fact uninstalled, but the user can get them back by simply clicking the icons. I would naturally rather have a cleaned start menu.
Debloat log says “Win11 detected” and “start menu was cleared”. I also have your LayoutModification.json in the default user’s shell folder. It just seems as if it doesn’t get applied soon enough.
Can you think of any way to circumvent this? As an alternative I have been experimenting with regulating the start menu by utlitzing the “ConfigureStartPins”-CSP, which does work, but as we all know, this constantly overwrites any changes made by the users which is a major disadvantage from the user perspective. I could also ask the OEM to put the JSON into their factory image but I would rather stay independent from them in that department.
Thx very much in advance for your thoughts.
Chris
Hi Chris,
I’ve just added a new version which also adds a .bin file for Windows 11. Can you see if that fixes it?
Thanks
Hi Andrew,
this seems to have fixed it. Many thanks for your immediate response!
Regards,
Chris
Seems like for W11 Ent 23H2 it made all the Public Desktop icons and Start bar active process appear as the generic window with blue rectangle in the middle. Might need to put a check for which version of windows is being used. Can reassign the Public Desktop Icons, doesn’t seem to work for start bar active processes icons (just third-party apps/edge not explorer or other system icons like recycling bin etc)
https://lazyadmin.nl/win-11/customize-windows-11-start-menu-layout/
maybe start3.bin?
Looks like it was also start2.bin on 23H2, if you use self-deploy and assign apps to device prior to the user initial login, those apps will be impacted until the provided “blank” start2.bin was deleted. Don’t exactly know how the bin assigns values to changes made, I haven’t been able to open it in a human readable format.
Looking at the comment that drove this change, using a w11 Enterprise 23H2 ISO the clear layout seemed to work perfectly, outside of failing to properly unpin store. I think I will likely just comment out that portion of code.
How are you deploying the script? If its running as a platform script, it should complete before any apps are installed on the device.
I can add some logic for it not to run that section if apps are installed, but for non-enterprise, that will leave tiktok etc. On the start menu
Hi Andrew, I have tried to use this script which works very well indeed, but it apepars to be ignoring the whitelist. I’ve attached the script, which also contains the github link, wondered if you could advise?
$DebloatFolder = “C:\ProgramData\Debloat”
If (Test-Path $DebloatFolder) {
Write-Output “$DebloatFolder exists. Skipping.”
}
Else {
Write-Output “The folder ‘$DebloatFolder’ doesn’t exist. This folder will be used for storing logs created after the script runs. Creating now.”
Start-Sleep 1
New-Item -Path “$DebloatFolder” -ItemType Directory
Write-Output “The folder $DebloatFolder was successfully created.”
}
$templateFilePath = “C:\ProgramData\Debloat\removebloat.ps1”
Invoke-WebRequest `
-Uri “https://raw.githubusercontent.com/bridgewaterha/bloat/main/RemoveBloat.ps1” `
-OutFile $templateFilePath `
-UseBasicParsing `
-Headers @{“Cache-Control”=”no-cache”}
##Populate between the speechmarks any apps you want to whitelist, comma-separated
$arguments = ‘ -customwhitelist “XelionWindowsDesktop,MSTeams,AppUp.IntelGraphicsExperience,CLEVOCO.LedKeyboardSetting”‘
invoke-expression -Command “$templateFilePath $arguments”
Hi, If you just pass one app through, does that add ok or is it skipping all of them?
Is this issue fixed as we would also like to use the whitelisting feature. How should the custom whitelist be formatted?
Yes, it should be working fine. Separate them with a comma
Hi Andrew, greetings from Spain. I’m customizing your script a bit by adding some exceptions in the whitelist. My problem is with “Windows Media Player” “https://apps.microsoft.com/detail/9wzdncrfj3pt?activetab=pivot%3Aoverviewtab&hl=en-us&gl=US” whose package name is “Microsoft.ZuneMusic”. Despite having made an exception, it doesn’t appear on the computer. I’m deploying it as a script in Intune. What could be happening? Thank you very much.
#Removes AppxPackages
$WhitelistedApps = @(
‘Microsoft.WindowsNotepad’,
‘Microsoft.CompanyPortal’,
‘Microsoft.ScreenSketch’,
‘Microsoft.Paint3D’,
‘Microsoft.WindowsCalculator’,
‘Microsoft.WindowsStore’,
‘Microsoft.Windows.Photos’,
‘CanonicalGroupLimited.UbuntuonWindows’,
‘Microsoft.MicrosoftStickyNotes’,
‘Microsoft.MSPaint’,
‘Microsoft.WindowsCamera’,
‘.NET Framework’,
‘Microsoft.HEIFImageExtension’,
‘Microsoft.ScreenSketch’,
‘Microsoft.StorePurchaseApp’,
‘Microsoft.VP9VideoExtensions’,
‘Microsoft.WebMediaExtensions’,
‘Microsoft.WebpImageExtension’,
‘Microsoft.DesktopAppInstaller’,
‘WindSynthBerry’,
‘MIDIBerry’,
‘Slack’,
‘Microsoft.SecHealthUI’,
### Personalizado ###
#’Microsoft.WindowsSoundRecorder’
‘Microsoft.ZuneMusic’,
#’Microsoft.ZuneVideo’,
‘Microsoft.WindowsAlarms’
)
##If $customwhitelist is set, split on the comma and add to whitelist
if ($customwhitelist) {
$customWhitelistApps = $customwhitelist -split “,”
foreach ($whitelistapp in $customwhitelistapps) {
##Add to the array
$WhitelistedApps += $whitelistapp
}
}
#NonRemovable Apps that where getting attempted and the system would reject the uninstall, speeds up debloat and prevents ‘initalizing’ overlay when removing apps
$NonRemovable = @(
‘1527c705-839a-4832-9118-54d4Bd6a0c89’,
‘c5e2524a-ea46-4f67-841f-6a9465d9d515’,
‘E2A4F912-2574-4A75-9BB0-0D023378592B’,
‘F46D4000-FD22-4DB4-AC8E-4E1DDDE828FE’,
‘InputApp’,
‘Microsoft.AAD.BrokerPlugin’,
‘Microsoft.AccountsControl’,
‘Microsoft.BioEnrollment’,
‘Microsoft.CredDialogHost’,
‘Microsoft.ECApp’,
‘Microsoft.LockApp’,
‘Microsoft.MicrosoftEdgeDevToolsClient’,
‘Microsoft.MicrosoftEdge’,
‘Microsoft.PPIProjection’,
‘Microsoft.Win32WebViewHost’,
‘Microsoft.Windows.Apprep.ChxApp’,
‘Microsoft.Windows.AssignedAccessLockApp’,
‘Microsoft.Windows.CapturePicker’,
‘Microsoft.Windows.CloudExperienceHost’,
‘Microsoft.Windows.ContentDeliveryManager’,
‘Microsoft.Windows.Cortana’,
‘Microsoft.Windows.NarratorQuickStart’,
‘Microsoft.Windows.ParentalControls’,
‘Microsoft.Windows.PeopleExperienceHost’,
‘Microsoft.Windows.PinningConfirmationDialog’,
‘Microsoft.Windows.SecHealthUI’,
‘Microsoft.Windows.SecureAssessmentBrowser’,
‘Microsoft.Windows.ShellExperienceHost’,
‘Microsoft.Windows.XGpuEjectDialog’,
‘Microsoft.XboxGameCallableUI’,
‘Windows.CBSPreview’,
‘windows.immersivecontrolpanel’,
‘Windows.PrintDialog’,
‘Microsoft.VCLibs.140.00’,
‘Microsoft.Services.Store.Engagement’,
‘Microsoft.UI.Xaml.2.0’,
‘*Nvidia*’,
“Microsoft.AsyncTextService”,
“Microsoft.UI.Xaml.CBS”,
“Microsoft.Windows.CallingShellApp”,
“Microsoft.Windows.OOBENetworkConnectionFlow”,
“Microsoft.Windows.PrintQueueActionCenter”,
“Microsoft.Windows.StartMenuExperienceHost”,
“MicrosoftWindows.Client.CBS”,
“MicrosoftWindows.Client.Core”,
“MicrosoftWindows.UndockedDevKit”,
“NcsiUwpApp”,
“Microsoft.NET.Native.Runtime.2.2”,
“Microsoft.NET.Native.Framework.2.2”,
“Microsoft.UI.Xaml.2.8”,
“Microsoft.UI.Xaml.2.*”,
“Microsoft.UI.Xaml.2.7”,
“Microsoft.UI.Xaml.2.3”,
“Microsoft.UI.Xaml.2.4”,
“Microsoft.UI.Xaml.2.1”,
“Microsoft.UI.Xaml.2.2”,
“Microsoft.UI.Xaml.2.5”,
“Microsoft.UI.Xaml.2.6”,
“Microsoft.VCLibs.140.00.UWPDesktop”,
“MicrosoftWindows.Client.LKG”,
“MicrosoftWindows.Client.FileExp”,
“Microsoft.WindowsAppRuntime.1.5”,
“Microsoft.WindowsAppRuntime.1.3”,
“Microsoft.WindowsAppRuntime.1.*”,
“Microsoft.Windows.OOBENetworkCaptivePortal”,
“Microsoft.Windows.Search”
)
##Combine the two arrays
$appstoignore = $WhitelistedApps += $NonRemovable
$provisioned = Get-AppxProvisionedPackage -Online | Where-Object {$_.DisplayName -notin $appstoignore}
foreach ($appxprov in $provisioned) {
$packagename = $appxprov.PackageName
$displayname = $appxprov.DisplayName
write-host “Removing $displayname AppX Provisioning Package”
try {
Remove-AppxProvisionedPackage -PackageName $packagename -Online -ErrorAction SilentlyContinue
}
catch {
write-host “Unable to remove $displayname AppX Provisioning Package”
}
write-host “Removed $displayname AppX Provisioning Package”
}
$appxinstalled = Get-AppxPackage -AllUsers | Where-Object {$_.Name -notin $appstoignore}
foreach ($appxapp in $appxinstalled) {
$packagename = $appxapp.PackageFullName
$displayname = $appxapp.Name
write-host “$displayname AppX Package exists”
write-host “Removing $displayname AppX Package”
try {
Remove-AppxPackage -Package $packagename -AllUsers -ErrorAction SilentlyContinue
write-host “Removed $displayname AppX Package”
}
catch {
write-host “$displayname AppX Package does not exist”
}
}
##Remove bloat
$Bloatware = @(
#Unnecessary Windows 10/11 AppX Apps
“Microsoft.549981C3F5F10”
“Microsoft.BingNews”
“Microsoft.GetHelp”
“Microsoft.Getstarted”
“Microsoft.Messaging”
“Microsoft.Microsoft3DViewer”
“Microsoft.MicrosoftOfficeHub”
“Microsoft.MicrosoftSolitaireCollection”
“Microsoft.NetworkSpeedTest”
“Microsoft.MixedReality.Portal”
“Microsoft.News”
“Microsoft.Office.Lens”
“Microsoft.Office.OneNote”
“Microsoft.Office.Sway”
“Microsoft.OneConnect”
“Microsoft.People”
“Microsoft.Print3D”
“Microsoft.RemoteDesktop”
“Microsoft.SkypeApp”
“Microsoft.StorePurchaseApp”
“Microsoft.Office.Todo.List”
“Microsoft.Whiteboard”
#”Microsoft.WindowsAlarms”
#”Microsoft.WindowsCamera”
“microsoft.windowscommunicationsapps”
“Microsoft.WindowsFeedbackHub”
“Microsoft.WindowsMaps”
“Microsoft.WindowsSoundRecorder”
“Microsoft.Xbox.TCUI”
“Microsoft.XboxApp”
“Microsoft.XboxGameOverlay”
“Microsoft.XboxIdentityProvider”
“Microsoft.XboxSpeechToTextOverlay”
#”Microsoft.ZuneMusic”
“Microsoft.ZuneVideo”
“MicrosoftTeams”
“Microsoft.YourPhone”
“Microsoft.XboxGamingOverlay_5.721.10202.0_neutral_~_8wekyb3d8bbwe”
“Microsoft.GamingApp”
“Microsoft.Todos”
“Microsoft.PowerAutomateDesktop”
“SpotifyAB.SpotifyMusic”
“Microsoft.MicrosoftJournal”
“Disney.37853FC22B2CE”
“*EclipseManager*”
“*ActiproSoftwareLLC*”
“*AdobeSystemsIncorporated.AdobePhotoshopExpress*”
“*Duolingo-LearnLanguagesforFree*”
“*PandoraMediaInc*”
“*CandyCrush*”
“*BubbleWitch3Saga*”
“*Wunderlist*”
“*Flipboard*”
“*Twitter*”
“*Facebook*”
“*Spotify*”
“*Minecraft*”
“*Royal Revolt*”
“*Sway*”
“*Speed Test*”
“*Dolby*”
“*Office*”
“*Disney*”
“clipchamp.clipchamp”
“*gaming*”
“MicrosoftCorporationII.MicrosoftFamily”
“C27EB4BA.DropboxOEM*”
“*DevHome*”
“MicrosoftCorporationII.QuickAssist”
#Optional: Typically not removed but you can if you need to for some reason
#”*Microsoft.Advertising.Xaml_10.1712.5.0_x64__8wekyb3d8bbwe*”
#”*Microsoft.Advertising.Xaml_10.1712.5.0_x86__8wekyb3d8bbwe*”
#”*Microsoft.BingWeather*”
#”*Microsoft.MSPaint*”
#”*Microsoft.MicrosoftStickyNotes*”
#”*Microsoft.Windows.Photos*”
#”*Microsoft.WindowsCalculator*”
#”*Microsoft.WindowsStore*”
)
##If custom whitelist specified, remove from array
if ($customwhitelist) {
$customWhitelistApps = $customwhitelist -split “,”
$Bloatware = $Bloatware | Where-Object { $customWhitelistApps -notcontains $_ }
}
foreach ($Bloat in $Bloatware) {
try {
Get-AppxProvisionedPackage -Online | Where-Object DisplayName -like $Bloat | Remove-AppxProvisionedPackage -Online
Write-Host “Removed provisioned package for $Bloat.”
} catch {
Write-Host “Provisioned package for $Bloat not found.”
}
try {
Get-AppxPackage -AllUsers | Where-Object Name -like $Bloat | Remove-AppxPackage -AllUsers
Write-Host “Removed $Bloat.”
} catch {
Write-Host “$Bloat not found.”
}
}
Hi Carlos, what issues are you having with it?
Basically the app I mentioned (Microsoft.ZuneMusic) doesn’t appear after the script, when it is supposed to be exempted from being uninstalled. I don’t know if I’m doing something wrong.
Do the logs show it being removed?
Hi Andrew.
First off, great work on this script.
We’re using it in the following scenario:
Auto pilot with pre-provisioning.
The de-bloat is assigned to the device but we don’t list it as a blocking application in ESP.
It seems to not do anything until the user signs in.
You can then see the debloat folder populating.
The only issue we have is with the McAfee removal. The debloat log shows the removal tool running and it the process can be seen as running.
The log reports successful removal as well.
However McAfee still shows in the systray and in add/remove programs.
The McSvcHost is also still running.
Windows security center also shows the software as installed and running.
When the laptop is rebooted and the use signs back in McAfee is no longer in the systray, the service has stopped and has been removed.
All that remains is the program itself in add/remove programs along with McAfee Software Update, McpManagementService and mc-wps-secdashboardservice which are all stopped (set to manual)
Security center no longer shows it as running etc.
Is there anyway of making the device reboot once the script has reported as finished so it finishes the removal?
Any other suggestions?
The user that signs in is configured as a standard user and cmd and powershell are both blocked by other policies.
I did try running this as platform script btw. it failed on every device so either I’m not configuring it properly or something else is stopping it at the ESP phase.
Hi Peter,
How are you configuring detection for the app? One option would be to tweak the detection so that the script is nearly finished (the McAfee removal tool is probably far enough along). Then you could deploy a second win32 app with a dependancy on the bloat removal which simply triggers a reboot (maybe add a pause of 1 minute to let the other one finish).
It should work as a platform script though, are there any failures in the debloat log which would be marking it as failed or did it not run at all?
Thanks
For detection I’ve used the one you’ve suggested; check that the log file exists.
I’m just running another one through to confirm that a restart is all that’s needed.
It’s odd that the removal tool isn’t killing and deleting all the services though or fully removing the software from add/remove programs even after a restart.
I’ve emailed you a copy of the log file from a machine that we’re seeing this issue
These are Lenovo ThinkPad E16 Gen1 laptops.
As for the platform script I don’t think it even deployed.
This is how I have it configured
PowerShell script:
debloat-intune-script.ps1
Run this script using the logged on credentials:
No
Enforce script signature check:
Yes
Run script in 64 bit PowerShell Host:
Yes
In a pre-provisioning scenario when would this run?
Is the signature check causing the issue?
Could we maybe use a detection script that reads the logfile for “Windows Powershell transcript end”.
If it’s done writing the log we can use the app deployment to enforce a restart on completion.
Something like: Get-Content -Path C:\ProgramData\Debloat\debloat.log | Select-String -Pattern “Windows Powershell transcript end”
Yes, that should work nicely. I think Win32 is your best bet for pre-prov.
Sadly with McAfee that tool is the only option available without manual intervention, they don’t make things easy
Hi Andrew,
We spoke before when we had some issues. We had been using your original version (got it all working) for a month or so. Noticed today its failing on all our devices. I did one before your latest update and it worked no problems but the 3 I tried today all fail. Checked and the reason for the fail is detection method fails. Notice that there is no log file being created (hence the detection fails). Has anyone else reported issues.
Dave
Hi Dave,
Nothing reported so far, are you deploying as a platform script or a win32?
Win32 and even created a new app in intune to push out. Its odd no file created.
I usually deploy as a platform script, it runs earlier during ESP
Hi Andrew thank you for your awesome efforts to support this community!
I’ve tried deploying this script via a Platform Script.
The scripts run fine and populates the log files with a lot of “removed”/”uninstalling” actions, however after execution there are no differences on the desktop for any of the existing users.
All the appx that was detected as bloatware are still there.
What could be the issue? I’ve tried running the script manually on a similar machine here it works fine.
Do you have the script set in system context and 64-bit?
Yes exactly
I also tried deploying it via win32, same result
Can you email me the logs?
Yes I already sent those before commenting here actually.
Sent on friday to [email protected]
Looks like you’re missing the s in the domain name, andrewstaylor.com (as much as I would love the andrewtaylor.com one it was already taken 🙁 )
Hi Andrew,
Great script, though I have had mixed results with uninstalling McAfee from Lenovo ThinkBook 14 G6 IRL.
I have deployed the script many times as Win32 app, but no luck in getting McAfee removed 🙁
When I look at the log Debloat.log, it looks like the script only detects McAfee, but doesn’t do anything other than that. It doesn’t download the Removal Tools and when i check the folder Debloat it should have the folders of de Removal Tool and that is also empty.
Here’s the last section of the log. With every deployment it is still the same result. Just detecting it and then no more.
***************************** Debloat.log******************************************************
Unable to find shortcut C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Lenovo Now.lnk
True
True
True
True
True
Delete the registry HKCU…
Deleted the registry HKCU… HKU:\S-1-5-21-2465977766-3475919222-1947236409-1000\Software\Lenovo\LenovoFirstRunExperience
Start to Unregister Uninstall list
ERROR: The system was unable to find the specified registry key or value.
Unregister Uninstall list
Delete the registry HKLM…
Deleted the registry HKLM… HKLM:\SOFTWARE\Wow6432Node\Lenovo\LenovoWelcome
Remove catalog
UNINSTALL COMPLETE
All applications and associated Lenovo components have been uninstalled.
Detecting McAfee
Completed
**********************
Windows PowerShell transcript end
End time: 20240607162335
**********************
I can’t figure out why this is happening and still need to do this for 25 other laptops.
Can you have a look at it again please, why this is happening ?
Hi,
Can you try running as a platform script instead of Win32?
It should also say McAfee detected, can you check the displayname in the registry for it?
Hi Andrew- thanks for working on this script. I assume I could just package the RemoveBloat.ps1 modify for my environment and not use the De-Bloat-intune-script.ps1
Making my install command powershell.exe -ExecutionPolicy Bypass -NoProfile -WindowStyle Hidden -File “Removebloat.ps1” I’ve had mix results in the powershell windows being shown on the users device. Suggestions?
Yes, absolutely. The only reason I have it in two scripts is to save me having to replace the one in Intune everytime I update it (which will trigger a re-run, obviously it won’t remove anything, but it’s another deployment).
Another option would be to amend the de-bloat-intune-script to use this:
https://github.com/MSEndpointMgr/PSInvoker
That will hide any pop-up windows from displaying
Thanks Andrew!
Hi,
Thank you so much for putting this script together. I tried deploying this in intune using the debloat-intune-script.intunewin. I think it deployed and ran correctly on a newly deployed machine but it didnt actually remove anything. According to the logs it says it did, here are the logs:
**********************
Windows PowerShell transcript start
Start time: 20240603225944
Username: WORKGROUP\SYSTEM
RunAs User: WORKGROUP\SYSTEM
Configuration Name:
Machine: (Microsoft Windows NT 10.0.22631.0)
Host Application: powershell -executionpolicy bypass -file debloat-intune-script.ps1
Process ID: 2944
PSVersion: 5.1.22621.2506
PSEdition: Desktop
PSCompatibleVersions: 1.0, 2.0, 3.0, 4.0, 5.0, 5.1.22621.2506
BuildVersion: 10.0.22621.2506
CLRVersion: 4.0.30319.42000
WSManStackVersion: 3.0
PSRemotingProtocolVersion: 2.3
SerializationVersion: 1.1.0.1
**********************
Transcript started, output file is C:\ProgramData\Debloat\Debloat.log
Removing AppUp.IntelGraphicsExperience AppX Provisioning Package
Path :
Online : True
Removed AppUp.IntelGraphicsExperience AppX Provisioning Package
Removing AppUp.IntelManagementandSecurityStatus AppX Provisioning Package
Path :
Online : True
Removed AppUp.IntelManagementandSecurityStatus AppX Provisioning Package
Removing AppUp.IntelOptaneMemoryandStorageManagement AppX Provisioning Package
Path :
Online : True
Removed AppUp.IntelOptaneMemoryandStorageManagement AppX Provisioning Package
Removing AppUp.IntelTechnologyMDE AppX Provisioning Package
Path :
Online : True
Removed AppUp.IntelTechnologyMDE AppX Provisioning Package
Removing Clipchamp.Clipchamp AppX Provisioning Package
Path :
Online : True
Removed Clipchamp.Clipchamp AppX Provisioning Package
Removing DellInc.DellDigitalDelivery AppX Provisioning Package
Path :
Online : True
Removed DellInc.DellDigitalDelivery AppX Provisioning Package
Removing DellInc.DellSupportAssistforPCs AppX Provisioning Package
Path :
Online : True
Removed DellInc.DellSupportAssistforPCs AppX Provisioning Package
Removing DellInc.DellUpdate AppX Provisioning Package
Path :
Online : True
Removed DellInc.DellUpdate AppX Provisioning Package
Removing DolbyLaboratories.DolbyAccessOEM AppX Provisioning Package
Path :
Online : True
Removed DolbyLaboratories.DolbyAccessOEM AppX Provisioning Package
Removing DolbyLaboratories.DolbyVisionAccess AppX Provisioning Package
Path :
Online : True
Removed DolbyLaboratories.DolbyVisionAccess AppX Provisioning Package
Removing McAfeeWPSSparsePackage AppX Provisioning Package
Path :
Online : True
Removed McAfeeWPSSparsePackage AppX Provisioning Package
Removing Microsoft.BingNews AppX Provisioning Package
Path :
Online : True
Removed Microsoft.BingNews AppX Provisioning Package
Removing Microsoft.BingWeather AppX Provisioning Package
Path :
Online : True
Removed Microsoft.BingWeather AppX Provisioning Package
Removing Microsoft.GamingApp AppX Provisioning Package
Path :
Online : True
Removed Microsoft.GamingApp AppX Provisioning Package
Removing Microsoft.GetHelp AppX Provisioning Package
Path :
Online : True
Removed Microsoft.GetHelp AppX Provisioning Package
Removing Microsoft.Getstarted AppX Provisioning Package
Path :
Online : True
Removed Microsoft.Getstarted AppX Provisioning Package
Removing Microsoft.HEVCVideoExtension AppX Provisioning Package
Path :
Online : True
Removed Microsoft.HEVCVideoExtension AppX Provisioning Package
Removing Microsoft.MicrosoftEdge.Stable AppX Provisioning Package
Path :
Online : True
Removed Microsoft.MicrosoftEdge.Stable AppX Provisioning Package
Removing Microsoft.MicrosoftOfficeHub AppX Provisioning Package
Path :
Online : True
Removed Microsoft.MicrosoftOfficeHub AppX Provisioning Package
Removing Microsoft.MicrosoftSolitaireCollection AppX Provisioning Package
Path :
Online : True
Removed Microsoft.MicrosoftSolitaireCollection AppX Provisioning Package
Removing Microsoft.MPEG2VideoExtension AppX Provisioning Package
Path :
Online : True
Removed Microsoft.MPEG2VideoExtension AppX Provisioning Package
Removing Microsoft.OutlookForWindows AppX Provisioning Package
Path :
Online : True
Removed Microsoft.OutlookForWindows AppX Provisioning Package
Removing Microsoft.Paint AppX Provisioning Package
Path :
Online : True
Removed Microsoft.Paint AppX Provisioning Package
Removing Microsoft.People AppX Provisioning Package
Path :
Online : True
Removed Microsoft.People AppX Provisioning Package
Removing Microsoft.PowerAutomateDesktop AppX Provisioning Package
Path :
Online : True
Removed Microsoft.PowerAutomateDesktop AppX Provisioning Package
Removing Microsoft.RawImageExtension AppX Provisioning Package
Path :
Online : True
Removed Microsoft.RawImageExtension AppX Provisioning Package
Removing Microsoft.SecHealthUI AppX Provisioning Package
PS>TerminatingError(Remove-AppxProvisionedPackage): “Removal failed. Please contact your software vendor.
”
Removed Microsoft.SecHealthUI AppX Provisioning Package
Removing Microsoft.Todos AppX Provisioning Package
Path :
Online : True
Removed Microsoft.Todos AppX Provisioning Package
Removing Microsoft.WinAppRuntime.DDLM.3000.882.2207.0-x6 AppX Provisioning Package
Path :
Online : True
Removed Microsoft.WinAppRuntime.DDLM.3000.882.2207.0-x6 AppX Provisioning Package
Removing Microsoft.WinAppRuntime.DDLM.3000.882.2207.0-x8 AppX Provisioning Package
Path :
Online : True
Removed Microsoft.WinAppRuntime.DDLM.3000.882.2207.0-x8 AppX Provisioning Package
Removing Microsoft.Windows.DevHome AppX Provisioning Package
Path :
Online : True
Removed Microsoft.Windows.DevHome AppX Provisioning Package
Removing Microsoft.WindowsAlarms AppX Provisioning Package
Path :
Online : True
Removed Microsoft.WindowsAlarms AppX Provisioning Package
Removing microsoft.windowscommunicationsapps AppX Provisioning Package
Path :
Online : True
Removed microsoft.windowscommunicationsapps AppX Provisioning Package
Removing Microsoft.WindowsFeedbackHub AppX Provisioning Package
Path :
Online : True
Removed Microsoft.WindowsFeedbackHub AppX Provisioning Package
Removing Microsoft.WindowsMaps AppX Provisioning Package
Path :
Online : True
Removed Microsoft.WindowsMaps AppX Provisioning Package
Removing Microsoft.WindowsSoundRecorder AppX Provisioning Package
Path :
Online : True
Removed Microsoft.WindowsSoundRecorder AppX Provisioning Package
Removing Microsoft.WindowsTerminal AppX Provisioning Package
Path :
Online : True
Removed Microsoft.WindowsTerminal AppX Provisioning Package
Removing Microsoft.Xbox.TCUI AppX Provisioning Package
Path :
Online : True
Removed Microsoft.Xbox.TCUI AppX Provisioning Package
Removing Microsoft.XboxGameOverlay AppX Provisioning Package
Path :
Online : True
Removed Microsoft.XboxGameOverlay AppX Provisioning Package
Removing Microsoft.XboxGamingOverlay AppX Provisioning Package
Path :
Online : True
Removed Microsoft.XboxGamingOverlay AppX Provisioning Package
Removing Microsoft.XboxIdentityProvider AppX Provisioning Package
Path :
Online : True
Removed Microsoft.XboxIdentityProvider AppX Provisioning Package
Removing Microsoft.XboxSpeechToTextOverlay AppX Provisioning Package
Path :
Online : True
Removed Microsoft.XboxSpeechToTextOverlay AppX Provisioning Package
Removing Microsoft.YourPhone AppX Provisioning Package
Path :
Online : True
Removed Microsoft.YourPhone AppX Provisioning Package
Removing Microsoft.ZuneMusic AppX Provisioning Package
Path :
Online : True
Removed Microsoft.ZuneMusic AppX Provisioning Package
Removing Microsoft.ZuneVideo AppX Provisioning Package
Path :
Online : True
Removed Microsoft.ZuneVideo AppX Provisioning Package
Removing MicrosoftCorporationII.MicrosoftFamily AppX Provisioning Package
Path :
Online : True
Removed MicrosoftCorporationII.MicrosoftFamily AppX Provisioning Package
Removing MicrosoftCorporationII.QuickAssist AppX Provisioning Package
Path :
Online : True
Removed MicrosoftCorporationII.QuickAssist AppX Provisioning Package
Removing MicrosoftCorporationII.WinAppRuntime.Main.1.3 AppX Provisioning Package
Path :
Online : True
Removed MicrosoftCorporationII.WinAppRuntime.Main.1.3 AppX Provisioning Package
Removing MicrosoftCorporationII.WinAppRuntime.Singleton AppX Provisioning Package
Path :
Online : True
Removed MicrosoftCorporationII.WinAppRuntime.Singleton AppX Provisioning Package
Removing MicrosoftTeams AppX Provisioning Package
Path :
Online : True
Removed MicrosoftTeams AppX Provisioning Package
Removing MicrosoftWindows.Client.WebExperience AppX Provisioning Package
Path :
Online : True
Removed MicrosoftWindows.Client.WebExperience AppX Provisioning Package
Removing MSTeams AppX Provisioning Package
Path :
Online : True
Removed MSTeams AppX Provisioning Package
Removing NVIDIACorp.NVIDIAControlPanel AppX Provisioning Package
Path :
Online : True
Removed NVIDIACorp.NVIDIAControlPanel AppX Provisioning Package
Removing RivetNetworks.KillerControlCenter AppX Provisioning Package
Path :
Online : True
Removed RivetNetworks.KillerControlCenter AppX Provisioning Package
Microsoft.AsyncTextService AppX Package does not exist
Microsoft.UI.Xaml.CBS AppX Package does not exist
Microsoft.Windows.CallingShellApp AppX Package does not exist
Microsoft.Windows.OOBENetworkCaptivePortal AppX Package does not exist
Microsoft.Windows.OOBENetworkConnectionFlow AppX Package does not exist
Microsoft.Windows.PrintQueueActionCenter AppX Package does not exist
Microsoft.Windows.StartMenuExperienceHost AppX Package does not exist
Microsoft.WindowsAppRuntime.CBS AppX Package does not exist
MicrosoftWindows.Client.CBS AppX Package does not exist
MicrosoftWindows.Client.Core AppX Package does not exist
MicrosoftWindows.Client.FileExp AppX Package does not exist
MicrosoftWindows.UndockedDevKit AppX Package does not exist
NcsiUwpApp AppX Package does not exist
Microsoft.WindowsAppRuntime.1.3 AppX Package does not exist
Microsoft.UI.Xaml.2.8 AppX Package does not exist
Microsoft.UI.Xaml.2.3 AppX Package does not exist
Microsoft.UI.Xaml.2.7 AppX Package does not exist
Microsoft.NET.Native.Runtime.2.2 AppX Package does not exist
Microsoft.NET.Native.Framework.2.2 AppX Package does not exist
Clipchamp.Clipchamp AppX Package does not exist
Microsoft.BingNews AppX Package does not exist
Microsoft.BingWeather AppX Package does not exist
Microsoft.GamingApp AppX Package does not exist
Microsoft.GetHelp AppX Package does not exist
Microsoft.Getstarted AppX Package does not exist
Microsoft.HEVCVideoExtension AppX Package does not exist
Microsoft.MicrosoftOfficeHub AppX Package does not exist
Microsoft.MicrosoftSolitaireCollection AppX Package does not exist
Microsoft.MPEG2VideoExtension AppX Package does not exist
Microsoft.OutlookForWindows AppX Package does not exist
Microsoft.Paint AppX Package does not exist
Microsoft.People AppX Package does not exist
Microsoft.PowerAutomateDesktop AppX Package does not exist
Microsoft.RawImageExtension AppX Package does not exist
Microsoft.SecHealthUI AppX Package does not exist
Microsoft.Todos AppX Package does not exist
Microsoft.UI.Xaml.2.4 AppX Package does not exist
Microsoft.Windows.DevHome AppX Package does not exist
Microsoft.WindowsAlarms AppX Package does not exist
microsoft.windowscommunicationsapps AppX Package does not exist
Microsoft.WindowsFeedbackHub AppX Package does not exist
Microsoft.WindowsMaps AppX Package does not exist
Microsoft.WindowsSoundRecorder AppX Package does not exist
Microsoft.WindowsTerminal AppX Package does not exist
Microsoft.Xbox.TCUI AppX Package does not exist
Microsoft.XboxGameOverlay AppX Package does not exist
Microsoft.XboxGamingOverlay AppX Package does not exist
Microsoft.XboxIdentityProvider AppX Package does not exist
Microsoft.XboxSpeechToTextOverlay AppX Package does not exist
Microsoft.YourPhone AppX Package does not exist
Microsoft.ZuneMusic AppX Package does not exist
Microsoft.ZuneVideo AppX Package does not exist
MicrosoftCorporationII.MicrosoftFamily AppX Package does not exist
MicrosoftCorporationII.QuickAssist AppX Package does not exist
MicrosoftTeams AppX Package does not exist
MicrosoftWindows.Client.WebExperience AppX Package does not exist
DellInc.DellSupportAssistforPCs AppX Package does not exist
AppUp.IntelManagementandSecurityStatus AppX Package does not exist
AppUp.IntelOptaneMemoryandStorageManagement AppX Package does not exist
Microsoft.VCLibs.140.00.UWPDesktop AppX Package does not exist
Microsoft.VCLibs.140.00.UWPDesktop AppX Package does not exist
RivetNetworks.KillerControlCenter AppX Package does not exist
AppUp.IntelGraphicsExperience AppX Package does not exist
Microsoft.NET.Native.Framework.2.2 AppX Package does not exist
Microsoft.NET.Native.Runtime.2.2 AppX Package does not exist
NVIDIACorp.NVIDIAControlPanel AppX Package does not exist
DolbyLaboratories.DolbyAccessOEM AppX Package does not exist
DellInc.DellDigitalDelivery AppX Package does not exist
Microsoft.WindowsAppRuntime.1.3 AppX Package does not exist
MicrosoftCorporationII.WinAppRuntime.Main.1.3 AppX Package does not exist
MicrosoftCorporationII.WinAppRuntime.Singleton AppX Package does not exist
Microsoft.WinAppRuntime.DDLM.3000.882.2207.0-x6 AppX Package does not exist
Microsoft.WinAppRuntime.DDLM.3000.882.2207.0-x8 AppX Package does not exist
McAfeeWPSSparsePackage AppX Package does not exist
DellInc.DellUpdate AppX Package does not exist
DolbyLaboratories.DolbyVisionAccess AppX Package does not exist
AppUp.IntelTechnologyMDE AppX Package does not exist
Microsoft.MicrosoftEdge.Stable AppX Package does not exist
MSTeams AppX Package does not exist
Provisioned package for Microsoft.549981C3F5F10 not found.
Microsoft.549981C3F5F10 not found.
Provisioned package for Microsoft.BingNews not found.
Microsoft.BingNews not found.
Provisioned package for Microsoft.GetHelp not found.
Microsoft.GetHelp not found.
Provisioned package for Microsoft.Getstarted not found.
Microsoft.Getstarted not found.
Provisioned package for Microsoft.Messaging not found.
Microsoft.Messaging not found.
Provisioned package for Microsoft.Microsoft3DViewer not found.
Microsoft.Microsoft3DViewer not found.
Provisioned package for Microsoft.MicrosoftOfficeHub not found.
Microsoft.MicrosoftOfficeHub not found.
Provisioned package for Microsoft.MicrosoftSolitaireCollection not found.
Microsoft.MicrosoftSolitaireCollection not found.
Provisioned package for Microsoft.NetworkSpeedTest not found.
Microsoft.NetworkSpeedTest not found.
Provisioned package for Microsoft.MixedReality.Portal not found.
Microsoft.MixedReality.Portal not found.
Provisioned package for Microsoft.News not found.
Microsoft.News not found.
Provisioned package for Microsoft.Office.Lens not found.
Microsoft.Office.Lens not found.
Provisioned package for Microsoft.Office.OneNote not found.
Microsoft.Office.OneNote not found.
Provisioned package for Microsoft.Office.Sway not found.
Microsoft.Office.Sway not found.
Provisioned package for Microsoft.OneConnect not found.
Microsoft.OneConnect not found.
Provisioned package for Microsoft.People not found.
Microsoft.People not found.
Provisioned package for Microsoft.Print3D not found.
Microsoft.Print3D not found.
Provisioned package for Microsoft.RemoteDesktop not found.
Microsoft.RemoteDesktop not found.
Provisioned package for Microsoft.SkypeApp not found.
Microsoft.SkypeApp not found.
Path :
Online : True
Removed provisioned package for Microsoft.StorePurchaseApp.
Microsoft.StorePurchaseApp not found.
Provisioned package for Microsoft.Office.Todo.List not found.
Microsoft.Office.Todo.List not found.
Provisioned package for Microsoft.Whiteboard not found.
Microsoft.Whiteboard not found.
Provisioned package for Microsoft.WindowsAlarms not found.
Microsoft.WindowsAlarms not found.
Provisioned package for microsoft.windowscommunicationsapps not found.
microsoft.windowscommunicationsapps not found.
Provisioned package for Microsoft.WindowsFeedbackHub not found.
Microsoft.WindowsFeedbackHub not found.
Provisioned package for Microsoft.WindowsMaps not found.
Microsoft.WindowsMaps not found.
Provisioned package for Microsoft.WindowsSoundRecorder not found.
Microsoft.WindowsSoundRecorder not found.
Provisioned package for Microsoft.Xbox.TCUI not found.
Microsoft.Xbox.TCUI not found.
Provisioned package for Microsoft.XboxApp not found.
Microsoft.XboxApp not found.
Provisioned package for Microsoft.XboxGameOverlay not found.
Microsoft.XboxGameOverlay not found.
Provisioned package for Microsoft.XboxIdentityProvider not found.
Microsoft.XboxIdentityProvider not found.
Provisioned package for Microsoft.XboxSpeechToTextOverlay not found.
Microsoft.XboxSpeechToTextOverlay not found.
Provisioned package for Microsoft.ZuneMusic not found.
Microsoft.ZuneMusic not found.
Provisioned package for Microsoft.ZuneVideo not found.
Microsoft.ZuneVideo not found.
Provisioned package for MicrosoftTeams not found.
MicrosoftTeams not found.
Provisioned package for Microsoft.YourPhone not found.
Microsoft.YourPhone not found.
Provisioned package for Microsoft.XboxGamingOverlay_5.721.10202.0_neutral_~_8wekyb3d8bbwe not found.
Microsoft.XboxGamingOverlay_5.721.10202.0_neutral_~_8wekyb3d8bbwe not found.
Provisioned package for Microsoft.GamingApp not found.
Microsoft.GamingApp not found.
Provisioned package for Microsoft.Todos not found.
Microsoft.Todos not found.
Provisioned package for Microsoft.PowerAutomateDesktop not found.
Microsoft.PowerAutomateDesktop not found.
Provisioned package for SpotifyAB.SpotifyMusic not found.
SpotifyAB.SpotifyMusic not found.
Provisioned package for Microsoft.MicrosoftJournal not found.
Microsoft.MicrosoftJournal not found.
Provisioned package for Disney.37853FC22B2CE not found.
Disney.37853FC22B2CE not found.
Provisioned package for *EclipseManager* not found.
*EclipseManager* not found.
Provisioned package for *ActiproSoftwareLLC* not found.
*ActiproSoftwareLLC* not found.
Provisioned package for *AdobeSystemsIncorporated.AdobePhotoshopExpress* not found.
*AdobeSystemsIncorporated.AdobePhotoshopExpress* not found.
Provisioned package for *Duolingo-LearnLanguagesforFree* not found.
*Duolingo-LearnLanguagesforFree* not found.
Provisioned package for *PandoraMediaInc* not found.
*PandoraMediaInc* not found.
Provisioned package for *CandyCrush* not found.
*CandyCrush* not found.
Provisioned package for *BubbleWitch3Saga* not found.
*BubbleWitch3Saga* not found.
Provisioned package for *Wunderlist* not found.
*Wunderlist* not found.
Provisioned package for *Flipboard* not found.
*Flipboard* not found.
Provisioned package for *Twitter* not found.
*Twitter* not found.
Provisioned package for *Facebook* not found.
*Facebook* not found.
Provisioned package for *Spotify* not found.
*Spotify* not found.
Provisioned package for *Minecraft* not found.
*Minecraft* not found.
Provisioned package for *Royal Revolt* not found.
*Royal Revolt* not found.
Provisioned package for *Sway* not found.
*Sway* not found.
Provisioned package for *Speed Test* not found.
*Speed Test* not found.
Provisioned package for *Dolby* not found.
*Dolby* not found.
Provisioned package for *Office* not found.
*Office* not found.
Provisioned package for *Disney* not found.
*Disney* not found.
Provisioned package for clipchamp.clipchamp not found.
clipchamp.clipchamp not found.
Provisioned package for *gaming* not found.
*gaming* not found.
Provisioned package for MicrosoftCorporationII.MicrosoftFamily not found.
MicrosoftCorporationII.MicrosoftFamily not found.
Provisioned package for C27EB4BA.DropboxOEM* not found.
C27EB4BA.DropboxOEM* not found.
Provisioned package for *DevHome* not found.
*DevHome* not found.
Provisioned package for MicrosoftCorporationII.QuickAssist not found.
MicrosoftCorporationII.QuickAssist not found.
Removing HKCR:\Extensions\ContractId\Windows.BackgroundTasks\PackageId\46928bounde.EclipseManager_2.2.4.51_neutral__a5h4egax66k6y from registry
Removing HKCR:\Extensions\ContractId\Windows.BackgroundTasks\PackageId\ActiproSoftwareLLC.562882FEEB491_2.6.18.18_neutral__24pqs290vpjk0 from registry
Removing HKCR:\Extensions\ContractId\Windows.BackgroundTasks\PackageId\Microsoft.MicrosoftOfficeHub_17.7909.7600.0_x64__8wekyb3d8bbwe from registry
Removing HKCR:\Extensions\ContractId\Windows.BackgroundTasks\PackageId\Microsoft.PPIProjection_10.0.15063.0_neutral_neutral_cw5n1h2txyewy from registry
Removing HKCR:\Extensions\ContractId\Windows.BackgroundTasks\PackageId\Microsoft.XboxGameCallableUI_1000.15063.0.0_neutral_neutral_cw5n1h2txyewy from registry
Removing HKCR:\Extensions\ContractId\Windows.BackgroundTasks\PackageId\Microsoft.XboxGameCallableUI_1000.16299.15.0_neutral_neutral_cw5n1h2txyewy from registry
Removing HKCR:\Extensions\ContractId\Windows.File\PackageId\ActiproSoftwareLLC.562882FEEB491_2.6.18.18_neutral__24pqs290vpjk0 from registry
Removing HKCR:\Extensions\ContractId\Windows.Launch\PackageId\46928bounde.EclipseManager_2.2.4.51_neutral__a5h4egax66k6y from registry
Removing HKCR:\Extensions\ContractId\Windows.Launch\PackageId\ActiproSoftwareLLC.562882FEEB491_2.6.18.18_neutral__24pqs290vpjk0 from registry
Removing HKCR:\Extensions\ContractId\Windows.Launch\PackageId\Microsoft.PPIProjection_10.0.15063.0_neutral_neutral_cw5n1h2txyewy from registry
Removing HKCR:\Extensions\ContractId\Windows.Launch\PackageId\Microsoft.XboxGameCallableUI_1000.15063.0.0_neutral_neutral_cw5n1h2txyewy from registry
Removing HKCR:\Extensions\ContractId\Windows.Launch\PackageId\Microsoft.XboxGameCallableUI_1000.16299.15.0_neutral_neutral_cw5n1h2txyewy from registry
Removing HKCR:\Extensions\ContractId\Windows.PreInstalledConfigTask\PackageId\Microsoft.MicrosoftOfficeHub_17.7909.7600.0_x64__8wekyb3d8bbwe from registry
Removing HKCR:\Extensions\ContractId\Windows.Protocol\PackageId\ActiproSoftwareLLC.562882FEEB491_2.6.18.18_neutral__24pqs290vpjk0 from registry
Removing HKCR:\Extensions\ContractId\Windows.Protocol\PackageId\Microsoft.PPIProjection_10.0.15063.0_neutral_neutral_cw5n1h2txyewy from registry
Removing HKCR:\Extensions\ContractId\Windows.Protocol\PackageId\Microsoft.XboxGameCallableUI_1000.15063.0.0_neutral_neutral_cw5n1h2txyewy from registry
Removing HKCR:\Extensions\ContractId\Windows.Protocol\PackageId\Microsoft.XboxGameCallableUI_1000.16299.15.0_neutral_neutral_cw5n1h2txyewy from registry
Removing HKCR:\Extensions\ContractId\Windows.ShareTarget\PackageId\ActiproSoftwareLLC.562882FEEB491_2.6.18.18_neutral__24pqs290vpjk0 from registry
Disabling Windows Feedback Experience program
Property : {}
PSPath : Microsoft.PowerShell.Core\Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Advert
isingInfo
PSParentPath : Microsoft.PowerShell.Core\Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion
PSChildName : AdvertisingInfo
PSDrive : HKLM
PSProvider : Microsoft.PowerShell.Core\Registry
PSIsContainer : True
SubKeyCount : 0
View : Default
Handle : Microsoft.Win32.SafeHandles.SafeRegistryHandle
ValueCount : 0
Name : HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\AdvertisingInfo
Stopping Cortana from being used as part of your Windows Search Function
Property : {}
PSPath : Microsoft.PowerShell.Core\Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Windows
Search
PSParentPath : Microsoft.PowerShell.Core\Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows
PSChildName : Windows Search
PSDrive : HKLM
PSProvider : Microsoft.PowerShell.Core\Registry
PSIsContainer : True
SubKeyCount : 0
View : Default
Handle : Microsoft.Win32.SafeHandles.SafeRegistryHandle
ValueCount : 0
Name : HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Windows Search
Disabling Bing Search in Start Menu
Property : {}
PSPath : Microsoft.PowerShell.Core\Registry::HKU\S-1-5-19\SOFTWARE\Microsoft\Windows\CurrentVersion\Search
PSParentPath : Microsoft.PowerShell.Core\Registry::HKU\S-1-5-19\SOFTWARE\Microsoft\Windows\CurrentVersion
PSChildName : Search
PSProvider : Microsoft.PowerShell.Core\Registry
PSIsContainer : True
SubKeyCount : 0
View : Default
Handle : Microsoft.Win32.SafeHandles.SafeRegistryHandle
ValueCount : 0
Name : HKEY_USERS\S-1-5-19\SOFTWARE\Microsoft\Windows\CurrentVersion\Search
Property : {}
PSPath : Microsoft.PowerShell.Core\Registry::HKU\S-1-5-20\SOFTWARE\Microsoft\Windows\CurrentVersion\Search
PSParentPath : Microsoft.PowerShell.Core\Registry::HKU\S-1-5-20\SOFTWARE\Microsoft\Windows\CurrentVersion
PSChildName : Search
PSProvider : Microsoft.PowerShell.Core\Registry
PSIsContainer : True
SubKeyCount : 0
View : Default
Handle : Microsoft.Win32.SafeHandles.SafeRegistryHandle
ValueCount : 0
Name : HKEY_USERS\S-1-5-20\SOFTWARE\Microsoft\Windows\CurrentVersion\Search
Stopping the Windows Feedback Experience program
Adding Registry key to prevent bloatware apps from returning
Property : {}
PSPath : Microsoft.PowerShell.Core\Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\CloudContent
PSParentPath : Microsoft.PowerShell.Core\Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows
PSChildName : CloudContent
PSDrive : HKLM
PSProvider : Microsoft.PowerShell.Core\Registry
PSIsContainer : True
SubKeyCount : 0
View : Default
Handle : Microsoft.Win32.SafeHandles.SafeRegistryHandle
ValueCount : 0
Name : HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\CloudContent
Property : {}
PSPath : Microsoft.PowerShell.Core\Registry::HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Content
DeliveryManager
PSParentPath : Microsoft.PowerShell.Core\Registry::HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion
PSChildName : ContentDeliveryManager
PSDrive : HKCU
PSProvider : Microsoft.PowerShell.Core\Registry
PSIsContainer : True
SubKeyCount : 0
View : Default
Handle : Microsoft.Win32.SafeHandles.SafeRegistryHandle
ValueCount : 0
Name : HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager
Setting Mixed Reality Portal value to 0 so that you can uninstall it in Settings
Disabling Wi-Fi Sense
Disabling live tiles
Property : {}
PSPath : Microsoft.PowerShell.Core\Registry::HKU\S-1-12-1-820289271-1222597259-2728346554-2306534034\SOFTWARE\Po
licies\Microsoft\Windows\CurrentVersion\PushNotifications
PSParentPath : Microsoft.PowerShell.Core\Registry::HKU\S-1-12-1-820289271-1222597259-2728346554-2306534034\SOFTWARE\Po
licies\Microsoft\Windows\CurrentVersion
PSChildName : PushNotifications
PSProvider : Microsoft.PowerShell.Core\Registry
PSIsContainer : True
SubKeyCount : 0
View : Default
Handle : Microsoft.Win32.SafeHandles.SafeRegistryHandle
ValueCount : 0
Name : HKEY_USERS\S-1-12-1-820289271-1222597259-2728346554-2306534034\SOFTWARE\Policies\Microsoft\Windows\Curr
entVersion\PushNotifications
Property : {}
PSPath : Microsoft.PowerShell.Core\Registry::HKU\S-1-5-19\SOFTWARE\Policies\Microsoft\Windows\CurrentVersion\Pus
hNotifications
PSParentPath : Microsoft.PowerShell.Core\Registry::HKU\S-1-5-19\SOFTWARE\Policies\Microsoft\Windows\CurrentVersion
PSChildName : PushNotifications
PSProvider : Microsoft.PowerShell.Core\Registry
PSIsContainer : True
SubKeyCount : 0
View : Default
Handle : Microsoft.Win32.SafeHandles.SafeRegistryHandle
ValueCount : 0
Name : HKEY_USERS\S-1-5-19\SOFTWARE\Policies\Microsoft\Windows\CurrentVersion\PushNotifications
Property : {}
PSPath : Microsoft.PowerShell.Core\Registry::HKU\S-1-5-20\SOFTWARE\Policies\Microsoft\Windows\CurrentVersion\Pus
hNotifications
PSParentPath : Microsoft.PowerShell.Core\Registry::HKU\S-1-5-20\SOFTWARE\Policies\Microsoft\Windows\CurrentVersion
PSChildName : PushNotifications
PSProvider : Microsoft.PowerShell.Core\Registry
PSIsContainer : True
SubKeyCount : 0
View : Default
Handle : Microsoft.Win32.SafeHandles.SafeRegistryHandle
ValueCount : 0
Name : HKEY_USERS\S-1-5-20\SOFTWARE\Policies\Microsoft\Windows\CurrentVersion\PushNotifications
Disabling People icon on Taskbar
Disabling Cortana
Property : {}
PSPath : Microsoft.PowerShell.Core\Registry::HKEY_CURRENT_USER\SOFTWARE\Microsoft\InputPersonalization
PSParentPath : Microsoft.PowerShell.Core\Registry::HKEY_CURRENT_USER\SOFTWARE\Microsoft
PSChildName : InputPersonalization
PSDrive : HKCU
PSProvider : Microsoft.PowerShell.Core\Registry
PSIsContainer : True
SubKeyCount : 0
View : Default
Handle : Microsoft.Win32.SafeHandles.SafeRegistryHandle
ValueCount : 0
Name : HKEY_CURRENT_USER\SOFTWARE\Microsoft\InputPersonalization
Property : {}
PSPath : Microsoft.PowerShell.Core\Registry::HKEY_CURRENT_USER\SOFTWARE\Microsoft\InputPersonalization\TrainedDa
taStore
PSParentPath : Microsoft.PowerShell.Core\Registry::HKEY_CURRENT_USER\SOFTWARE\Microsoft\InputPersonalization
PSChildName : TrainedDataStore
PSDrive : HKCU
PSProvider : Microsoft.PowerShell.Core\Registry
PSIsContainer : True
SubKeyCount : 0
View : Default
Handle : Microsoft.Win32.SafeHandles.SafeRegistryHandle
ValueCount : 0
Name : HKEY_CURRENT_USER\SOFTWARE\Microsoft\InputPersonalization\TrainedDataStore
Removing 3D Objects from explorer ‘My Computer’ submenu
Disabling Learn about this picture
Disabling scheduled tasks
Actions : {MSFT_TaskExecAction}
Author : Microsoft
Date :
Description : XblGameSave Standby Task
Documentation :
Principal : MSFT_TaskPrincipal2
SecurityDescriptor :
Settings : MSFT_TaskSettings3
Source :
State : Disabled
TaskName : XblGameSaveTask
TaskPath : \Microsoft\XblGameSave\
Triggers : {MSFT_TaskIdleTrigger}
URI : \Microsoft\XblGameSave\XblGameSaveTask
Version :
PSComputerName :
Actions : {MSFT_TaskExecAction}
Author : Microsoft Corporation
Date :
Description : If the user has consented to participate in the Windows Customer Experience Improvement Program,
this job collects and sends usage data to Microsoft.
Documentation :
Principal : MSFT_TaskPrincipal2
SecurityDescriptor : D:(A;OICI;FA;;;BA)(A;OICI;FA;;;SY)(A;OICI;GRGX;;;AU)
Settings : MSFT_TaskSettings3
Source : Windows Customer Experience Improvement Program
State : Disabled
TaskName : Consolidator
TaskPath : \Microsoft\Windows\Customer Experience Improvement Program\
Triggers : {MSFT_TaskTimeTrigger}
URI : \Microsoft\Windows\Customer Experience Improvement Program\Consolidator
Version : 1.0
PSComputerName :
Actions : {MSFT_TaskComHandlerAction}
Author : Microsoft Corporation
Date :
Description : The USB CEIP (Customer Experience Improvement Program) task collects Universal Serial Bus related
statistics and information about your machine and sends it to the Windows Device Connectivity
engineering group at Microsoft. The information received is used to help improve the
reliability, stability, and overall functionality of USB in Windows. If the user has not
consented to participate in Windows CEIP, this task does not do anything.
Documentation :
Principal : MSFT_TaskPrincipal2
SecurityDescriptor : D:(A;OICI;FA;;;BA)(A;OICI;FA;;;SY)(A;OICI;GRGX;;;AU)(A;OICI;SD;;;S-1-5-87-1060603329-121822201-345
2730971-4292368946-61207722)(A;;FRFX;;;LS)
Settings : MSFT_TaskSettings3
Source : Microsoft Corporation
State : Disabled
TaskName : UsbCeip
TaskPath : \Microsoft\Windows\Customer Experience Improvement Program\
Triggers :
URI : \Microsoft\Windows\Customer Experience Improvement Program\UsbCeip
Version : 1.0
PSComputerName :
Actions : {MSFT_TaskExecAction}
Author : Microsoft Windows Feedback
Date :
Description : Update SIUF strings
Documentation :
Principal : MSFT_TaskPrincipal2
SecurityDescriptor :
Settings : MSFT_TaskSettings3
Source : System Initiated User Feedback
State : Disabled
TaskName : DmClient
TaskPath : \Microsoft\Windows\Feedback\Siuf\
Triggers :
URI : \Microsoft\Windows\Feedback\Siuf\DmClient
Version :
PSComputerName :
Actions : {MSFT_TaskExecAction}
Author : Microsoft Windows Feedback
Date :
Description : Update SIUF strings
Documentation :
Principal : MSFT_TaskPrincipal2
SecurityDescriptor :
Settings : MSFT_TaskSettings3
Source : System Initiated User Feedback
State : Disabled
TaskName : DmClientOnScenarioDownload
TaskPath : \Microsoft\Windows\Feedback\Siuf\
Triggers : {MSFT_TaskTrigger}
URI : \Microsoft\Windows\Feedback\Siuf\DmClientOnScenarioDownload
Version :
PSComputerName :
Removing Windows 11 Customisations
Removed Microsoft.XboxGamingOverlay
PS>TerminatingError(Remove-AppxPackage): “Removal failed. Please contact your software vendor.
Deployment DeStage operation with target volume C: on Package Microsoft.XboxGameCallableUI_1000.22621.1.0_neutral_neutral_cw5n1h2txyewy from: failed with error 0x80070032. See http://go.microsoft.com/fwlink/?LinkId=235160 for help diagnosing app deployment issues.”
Removed Microsoft.XboxGameCallableUI
Removed *getstarted*
PS>TerminatingError(Remove-AppxPackage): “Removal failed. Please contact your software vendor.
Deployment DeStage operation with target volume C: on Package Microsoft.Windows.ParentalControls_1000.22621.1.0_neutral_neutral_cw5n1h2txyewy from: failed with error 0x80070032. See http://go.microsoft.com/fwlink/?LinkId=235160 for help diagnosing app deployment issues.”
Removed Microsoft.Windows.ParentalControls
Processing ACL of:
SetACL finished successfully.
Processing ACL of:
SetACL finished successfully.
Property : {}
PSPath : Microsoft.PowerShell.Core\Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Windows Chat
PSParentPath : Microsoft.PowerShell.Core\Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows
PSChildName : Windows Chat
PSDrive : HKLM
PSProvider : Microsoft.PowerShell.Core\Registry
PSIsContainer : True
SubKeyCount : 0
View : Default
Handle : Microsoft.Win32.SafeHandles.SafeRegistryHandle
ValueCount : 0
Name : HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Windows Chat
Removed Teams Chat
Property : {}
PSPath : Microsoft.PowerShell.Core\Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Dsh
PSParentPath : Microsoft.PowerShell.Core\Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft
PSChildName : Dsh
PSDrive : HKLM
PSProvider : Microsoft.PowerShell.Core\Registry
PSIsContainer : True
SubKeyCount : 0
View : Default
Handle : Microsoft.Win32.SafeHandles.SafeRegistryHandle
ValueCount : 0
Name : HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Dsh
Disabled Feeds
Removing Windows Copilot
The operation completed successfully.
The operation completed successfully.
Removed
Clearing Start Menu
Windows 11 Detected
Removing Current Layout
GamePresenceWriter.exe exists
Processing ACL of:
SetACL finished successfully.
Processing ACL of:
SetACL finished successfully.
SettingsPageVisibility : hide:gaming-gamebar;gaming-gamedvr;gaming-broadcasting;gaming-gamemode;gaming-xboxnetworking
PSPath : Microsoft.PowerShell.Core\Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersi
on\Policies\Explorer
PSParentPath : Microsoft.PowerShell.Core\Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersi
on\Policies
PSChildName : Explorer
PSDrive : HKLM
PSProvider : Microsoft.PowerShell.Core\Registry
Checking 32-bit System Registry
32-bit check complete
Checking 64-bit System registry
64-bit checks complete
Checking 32-bit User Registry
32-bit check complete
Checking 64-bit Use registry
Detecting Manufacturer
Dell detected
Provisioned package for Dell Optimizer not found.
Dell Optimizer not found.
Uninstalling: Dell Optimizer
Uninstalled: Dell Optimizer
Uninstalling: Dell Optimizer
Uninstalled: Dell Optimizer
Provisioned package for Dell Power Manager not found.
Dell Power Manager not found.
Provisioned package for DellOptimizerUI not found.
DellOptimizerUI not found.
Provisioned package for Dell SupportAssist OS Recovery not found.
Dell SupportAssist OS Recovery not found.
Provisioned package for Dell SupportAssist not found.
Dell SupportAssist not found.
Provisioned package for Dell Optimizer Service not found.
Dell Optimizer Service not found.
Provisioned package for DellInc.PartnerPromo not found.
DellInc.PartnerPromo not found.
Provisioned package for DellInc.DellOptimizer not found.
DellInc.DellOptimizer not found.
Provisioned package for DellInc.DellCommandUpdate not found.
DellInc.DellCommandUpdate not found.
Provisioned package for DellInc.DellPowerManager not found.
DellInc.DellPowerManager not found.
Provisioned package for DellInc.DellDigitalDelivery not found.
DellInc.DellDigitalDelivery not found.
Provisioned package for DellInc.DellSupportAssistforPCs not found.
DellInc.DellSupportAssistforPCs not found.
Provisioned package for DellInc.PartnerPromo not found.
DellInc.PartnerPromo not found.
Provisioned package for Dell Command | Update not found.
Dell Command | Update not found.
Provisioned package for Dell Command | Update for Windows Universal not found.
Dell Command | Update for Windows Universal not found.
Provisioned package for Dell Command | Update for Windows 10 not found.
Dell Command | Update for Windows 10 not found.
Provisioned package for Dell Command | Power Manager not found.
Dell Command | Power Manager not found.
Provisioned package for Dell Digital Delivery Service not found.
Dell Digital Delivery Service not found.
Provisioned package for Dell Digital Delivery not found.
Dell Digital Delivery not found.
Provisioned package for Dell Power Manager Service not found.
Dell Power Manager Service not found.
Provisioned package for SupportAssist Recovery Assistant not found.
SupportAssist Recovery Assistant not found.
Provisioned package for Dell SupportAssistAgent not found.
Dell SupportAssistAgent not found.
Provisioned package for Dell Update – SupportAssist Update Plugin not found.
Dell Update – SupportAssist Update Plugin not found.
Provisioned package for Dell Core Services not found.
Dell Core Services not found.
Provisioned package for Dell Update – SupportAssist Update Plugin not found.
Dell Update – SupportAssist Update Plugin not found.
Provisioned package for DellInc.PartnerPromo not found.
DellInc.PartnerPromo not found.
Removing Dell Optimizer
ReturnValue : 0
PSComputerName :
Removing Dell Power Manager
Removing DellOptimizerUI
Removing Dell SupportAssist OS Recovery
ReturnValue : 0
PSComputerName :
Removing Dell SupportAssist
ReturnValue : 0
PSComputerName :
ReturnValue : 0
PSComputerName :
Removing Dell Optimizer Service
Removing DellInc.PartnerPromo
Removing DellInc.DellOptimizer
Removing DellInc.DellCommandUpdate
Removing DellInc.DellPowerManager
Removing DellInc.DellDigitalDelivery
Removing DellInc.DellSupportAssistforPCs
Removing DellInc.PartnerPromo
Removing Dell Command | Update
ReturnValue : 0
PSComputerName :
Removing Dell Command | Update for Windows Universal
Removing Dell Command | Update for Windows 10
Removing Dell Command | Power Manager
Removing Dell Digital Delivery Service
ReturnValue : 0
PSComputerName :
Removing Dell Digital Delivery
Removing Dell Power Manager Service
Removing SupportAssist Recovery Assistant
Removing Dell SupportAssistAgent
Removing Dell Update – SupportAssist Update Plugin
Removing Dell Core Services
ReturnValue : 0
PSComputerName :
Removing Dell Update – SupportAssist Update Plugin
Removing DellInc.PartnerPromo
The system cannot find the path specified.
The system cannot find the path specified.
Detecting McAfee
Completed
**********************
Windows PowerShell transcript end
End time: 20240603231243
**********************
Hi, what apps has it left behind? I’ve just tested on a new machine and all of the usual ones seem to have been removed
Hi Andrew
Actually, when I ran it manually, it was removing them so something to do with the way it was deployed. Can I email you a screenshot of how I had it deployed?
Yes, of course
Hi, can you exclude the Dell Command Update app from being uninstalled? The app is needed for my company’s application requirements.
Yes, just pass it as a whitelisted app in the parameters (or fork the script and edit)
Hi Andrew,
I’m having the same issue. Apps in the whitelist still got removed. It just happened this week.(I have been using your scripts for a while and it works great)
Below is what have in the debloat-intune-script.ps1 script. Is there anything I missed? Wonder why it suddenly start to remove all the whitelist apps.
Thank you for your help. If you need I can post the log or email you the log.
##Populate between the speechmarks any apps you want to whitelist, comma-separated
$arguments = ‘ -customwhitelist “Microsoft.RemoteDesktop”,
“Dell Command | Update”,
“E046963F.LenovoSettingsforEnterprise”,
“MicrosoftCorporationII.QuickAssist”,
“Microsoft.WindowsSoundRecorder”‘
Hi, Can you try including all whitelist apps inside the same speechmarks, but still comma separated. If that still removes them, send me the log and I’ll see what’s going on
Morning – Me Again. So we managed to get it deployed 🙂 and the log is there however it hasn’t removed any apps? Clipchamp for example is still there. Last night we tested running the script locally and everything was removed.
Removed provisioned package for clipchamp.clipchamp.
clipchamp.clipchamp not found.
Sorry to be a pain just really want this to work. Here is the entire log.
**********************
Windows PowerShell transcript start
Start time: 20240509103424
Username: WORKGROUP\SYSTEM
RunAs User: WORKGROUP\SYSTEM
Configuration Name:
Machine: TMC00971 (Microsoft Windows NT 10.0.22631.0)
Host Application: C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -NoProfile -executionPolicy bypass -file C:\Program Files (x86)\Microsoft Intune Management Extension\Policies\Scripts\03a675cc-63d3-4fb1-ac82-d3f338dd74df_0e4eb01b-61f1-4609-a979-bcea9ab2d2d5.ps1
Process ID: 9620
PSVersion: 5.1.22621.2506
PSEdition: Desktop
PSCompatibleVersions: 1.0, 2.0, 3.0, 4.0, 5.0, 5.1.22621.2506
BuildVersion: 10.0.22621.2506
CLRVersion: 4.0.30319.42000
WSManStackVersion: 3.0
PSRemotingProtocolVersion: 2.3
SerializationVersion: 1.1.0.1
**********************
Transcript started, output file is C:\ProgramData\Debloat\Debloat.log
Path :
Online : True
Removed provisioned package for Microsoft.549981C3F5F10.
Microsoft.549981C3F5F10 not found.
Path :
Online : True
Removed provisioned package for Microsoft.BingNews.
Microsoft.BingNews not found.
Path :
Online : True
Removed provisioned package for Microsoft.GetHelp.
Microsoft.GetHelp not found.
Path :
Online : True
Removed provisioned package for Microsoft.Getstarted.
Microsoft.Getstarted not found.
Provisioned package for Microsoft.Messaging not found.
Microsoft.Messaging not found.
Provisioned package for Microsoft.Microsoft3DViewer not found.
Microsoft.Microsoft3DViewer not found.
Path :
Online : True
Removed provisioned package for Microsoft.MicrosoftOfficeHub.
Microsoft.MicrosoftOfficeHub not found.
Path :
Online : True
Removed provisioned package for Microsoft.MicrosoftSolitaireCollection.
Microsoft.MicrosoftSolitaireCollection not found.
Provisioned package for Microsoft.NetworkSpeedTest not found.
Microsoft.NetworkSpeedTest not found.
Provisioned package for Microsoft.MixedReality.Portal not found.
Microsoft.MixedReality.Portal not found.
Provisioned package for Microsoft.News not found.
Microsoft.News not found.
Provisioned package for Microsoft.Office.Lens not found.
Microsoft.Office.Lens not found.
Provisioned package for Microsoft.Office.OneNote not found.
Microsoft.Office.OneNote not found.
Provisioned package for Microsoft.Office.Sway not found.
Microsoft.Office.Sway not found.
Provisioned package for Microsoft.OneConnect not found.
Microsoft.OneConnect not found.
Path :
Online : True
Removed provisioned package for Microsoft.People.
Microsoft.People not found.
Provisioned package for Microsoft.Print3D not found.
Microsoft.Print3D not found.
Provisioned package for Microsoft.RemoteDesktop not found.
Microsoft.RemoteDesktop not found.
Provisioned package for Microsoft.SkypeApp not found.
Microsoft.SkypeApp not found.
Path :
Online : True
Removed provisioned package for Microsoft.StorePurchaseApp.
Microsoft.StorePurchaseApp not found.
Provisioned package for Microsoft.Office.Todo.List not found.
Microsoft.Office.Todo.List not found.
Provisioned package for Microsoft.Whiteboard not found.
Microsoft.Whiteboard not found.
Path :
Online : True
Removed provisioned package for Microsoft.WindowsAlarms.
Microsoft.WindowsAlarms not found.
Path :
Online : True
Removed provisioned package for microsoft.windowscommunicationsapps.
microsoft.windowscommunicationsapps not found.
Path :
Online : True
Removed provisioned package for Microsoft.WindowsFeedbackHub.
Microsoft.WindowsFeedbackHub not found.
Path :
Online : True
Removed provisioned package for Microsoft.WindowsMaps.
Microsoft.WindowsMaps not found.
Path :
Online : True
Removed provisioned package for Microsoft.WindowsSoundRecorder.
Microsoft.WindowsSoundRecorder not found.
Path :
Online : True
Removed provisioned package for Microsoft.Xbox.TCUI.
Microsoft.Xbox.TCUI not found.
Provisioned package for Microsoft.XboxApp not found.
Microsoft.XboxApp not found.
Path :
Online : True
Removed provisioned package for Microsoft.XboxGameOverlay.
Microsoft.XboxGameOverlay not found.
Path :
Online : True
Removed provisioned package for Microsoft.XboxIdentityProvider.
Microsoft.XboxIdentityProvider not found.
Path :
Online : True
Removed provisioned package for Microsoft.XboxSpeechToTextOverlay.
Microsoft.XboxSpeechToTextOverlay not found.
Path :
Online : True
Removed provisioned package for Microsoft.ZuneMusic.
Microsoft.ZuneMusic not found.
PS>TerminatingError(Get-AppxProvisionedPackage): “Another operation on app packages (.appx) is in progress.
Wait for the current operation to complete and then retry the command. For more information, see the help.
”
Removed provisioned package for Microsoft.ZuneVideo.
Microsoft.ZuneVideo not found.
PS>TerminatingError(Get-AppxProvisionedPackage): “Another operation on app packages (.appx) is in progress.
Wait for the current operation to complete and then retry the command. For more information, see the help.
”
MicrosoftTeams not found.
Path :
Online : True
Removed provisioned package for Microsoft.YourPhone.
Microsoft.YourPhone not found.
Provisioned package for Microsoft.XboxGamingOverlay_5.721.10202.0_neutral_~_8wekyb3d8bbwe not found.
Microsoft.XboxGamingOverlay_5.721.10202.0_neutral_~_8wekyb3d8bbwe not found.
Path :
Online : True
Removed provisioned package for Microsoft.GamingApp.
Microsoft.GamingApp not found.
Path :
Online : True
Removed provisioned package for Microsoft.Todos.
Microsoft.Todos not found.
Path :
Online : True
Removed provisioned package for Microsoft.PowerAutomateDesktop.
Microsoft.PowerAutomateDesktop not found.
Provisioned package for SpotifyAB.SpotifyMusic not found.
SpotifyAB.SpotifyMusic not found.
Provisioned package for Microsoft.MicrosoftJournal not found.
Microsoft.MicrosoftJournal not found.
Provisioned package for Disney.37853FC22B2CE not found.
Disney.37853FC22B2CE not found.
Provisioned package for *EclipseManager* not found.
*EclipseManager* not found.
Provisioned package for *ActiproSoftwareLLC* not found.
*ActiproSoftwareLLC* not found.
Provisioned package for *AdobeSystemsIncorporated.AdobePhotoshopExpress* not found.
*AdobeSystemsIncorporated.AdobePhotoshopExpress* not found.
PS>TerminatingError(Get-AppxProvisionedPackage): “Another operation on app packages (.appx) is in progress.
Wait for the current operation to complete and then retry the command. For more information, see the help.
”
*Duolingo-LearnLanguagesforFree* not found.
Provisioned package for *PandoraMediaInc* not found.
*PandoraMediaInc* not found.
Provisioned package for *CandyCrush* not found.
*CandyCrush* not found.
Provisioned package for *BubbleWitch3Saga* not found.
*BubbleWitch3Saga* not found.
PS>TerminatingError(Get-AppxProvisionedPackage): “Another operation on app packages (.appx) is in progress.
Wait for the current operation to complete and then retry the command. For more information, see the help.
”
*Wunderlist* not found.
PS>TerminatingError(Get-AppxProvisionedPackage): “Another operation on app packages (.appx) is in progress.
Wait for the current operation to complete and then retry the command. For more information, see the help.
”
*Flipboard* not found.
Provisioned package for *Twitter* not found.
*Twitter* not found.
Provisioned package for *Facebook* not found.
*Facebook* not found.
PS>TerminatingError(Get-AppxProvisionedPackage): “Another operation on app packages (.appx) is in progress.
Wait for the current operation to complete and then retry the command. For more information, see the help.
”
*Spotify* not found.
Provisioned package for *Minecraft* not found.
*Minecraft* not found.
PS>TerminatingError(Get-AppxProvisionedPackage): “Another operation on app packages (.appx) is in progress.
Wait for the current operation to complete and then retry the command. For more information, see the help.
”
*Royal Revolt* not found.
Provisioned package for *Sway* not found.
*Sway* not found.
Provisioned package for *Speed Test* not found.
*Speed Test* not found.
Provisioned package for *Dolby* not found.
*Dolby* not found.
PS>TerminatingError(Get-AppxProvisionedPackage): “Another operation on app packages (.appx) is in progress.
Wait for the current operation to complete and then retry the command. For more information, see the help.
”
*Office* not found.
Provisioned package for *Disney* not found.
*Disney* not found.
PS>TerminatingError(Get-AppxProvisionedPackage): “Another operation on app packages (.appx) is in progress.
Wait for the current operation to complete and then retry the command. For more information, see the help.
”
Removed provisioned package for clipchamp.clipchamp.
clipchamp.clipchamp not found.
PS>TerminatingError(Get-AppxProvisionedPackage): “Another operation on app packages (.appx) is in progress.
Wait for the current operation to complete and then retry the command. For more information, see the help.
”
Removed provisioned package for *gaming*.
*gaming* not found.
PS>TerminatingError(Get-AppxProvisionedPackage): “Another operation on app packages (.appx) is in progress.
Wait for the current operation to complete and then retry the command. For more information, see the help.
”
MicrosoftCorporationII.MicrosoftFamily not found.
Provisioned package for C27EB4BA.DropboxOEM* not found.
C27EB4BA.DropboxOEM* not found.
Provisioned package for *DevHome* not found.
*DevHome* not found.
Removing HKCR:\Extensions\ContractId\Windows.BackgroundTasks\PackageId\46928bounde.EclipseManager_2.2.4.51_neutral__a5h4egax66k6y from registry
Removing HKCR:\Extensions\ContractId\Windows.BackgroundTasks\PackageId\ActiproSoftwareLLC.562882FEEB491_2.6.18.18_neutral__24pqs290vpjk0 from registry
Removing HKCR:\Extensions\ContractId\Windows.BackgroundTasks\PackageId\Microsoft.MicrosoftOfficeHub_17.7909.7600.0_x64__8wekyb3d8bbwe from registry
Removing HKCR:\Extensions\ContractId\Windows.BackgroundTasks\PackageId\Microsoft.PPIProjection_10.0.15063.0_neutral_neutral_cw5n1h2txyewy from registry
Removing HKCR:\Extensions\ContractId\Windows.BackgroundTasks\PackageId\Microsoft.XboxGameCallableUI_1000.15063.0.0_neutral_neutral_cw5n1h2txyewy from registry
Removing HKCR:\Extensions\ContractId\Windows.BackgroundTasks\PackageId\Microsoft.XboxGameCallableUI_1000.16299.15.0_neutral_neutral_cw5n1h2txyewy from registry
Removing HKCR:\Extensions\ContractId\Windows.File\PackageId\ActiproSoftwareLLC.562882FEEB491_2.6.18.18_neutral__24pqs290vpjk0 from registry
Removing HKCR:\Extensions\ContractId\Windows.Launch\PackageId\46928bounde.EclipseManager_2.2.4.51_neutral__a5h4egax66k6y from registry
Removing HKCR:\Extensions\ContractId\Windows.Launch\PackageId\ActiproSoftwareLLC.562882FEEB491_2.6.18.18_neutral__24pqs290vpjk0 from registry
Removing HKCR:\Extensions\ContractId\Windows.Launch\PackageId\Microsoft.PPIProjection_10.0.15063.0_neutral_neutral_cw5n1h2txyewy from registry
Removing HKCR:\Extensions\ContractId\Windows.Launch\PackageId\Microsoft.XboxGameCallableUI_1000.15063.0.0_neutral_neutral_cw5n1h2txyewy from registry
Removing HKCR:\Extensions\ContractId\Windows.Launch\PackageId\Microsoft.XboxGameCallableUI_1000.16299.15.0_neutral_neutral_cw5n1h2txyewy from registry
Removing HKCR:\Extensions\ContractId\Windows.PreInstalledConfigTask\PackageId\Microsoft.MicrosoftOfficeHub_17.7909.7600.0_x64__8wekyb3d8bbwe from registry
Removing HKCR:\Extensions\ContractId\Windows.Protocol\PackageId\ActiproSoftwareLLC.562882FEEB491_2.6.18.18_neutral__24pqs290vpjk0 from registry
Removing HKCR:\Extensions\ContractId\Windows.Protocol\PackageId\Microsoft.PPIProjection_10.0.15063.0_neutral_neutral_cw5n1h2txyewy from registry
Removing HKCR:\Extensions\ContractId\Windows.Protocol\PackageId\Microsoft.XboxGameCallableUI_1000.15063.0.0_neutral_neutral_cw5n1h2txyewy from registry
Removing HKCR:\Extensions\ContractId\Windows.Protocol\PackageId\Microsoft.XboxGameCallableUI_1000.16299.15.0_neutral_neutral_cw5n1h2txyewy from registry
Removing HKCR:\Extensions\ContractId\Windows.ShareTarget\PackageId\ActiproSoftwareLLC.562882FEEB491_2.6.18.18_neutral__24pqs290vpjk0 from registry
Disabling Windows Feedback Experience program
Property : {}
PSPath : Microsoft.PowerShell.Core\Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Advert
isingInfo
PSParentPath : Microsoft.PowerShell.Core\Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion
PSChildName : AdvertisingInfo
PSDrive : HKLM
PSProvider : Microsoft.PowerShell.Core\Registry
PSIsContainer : True
SubKeyCount : 0
View : Default
Handle : Microsoft.Win32.SafeHandles.SafeRegistryHandle
ValueCount : 0
Name : HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\AdvertisingInfo
Stopping Cortana from being used as part of your Windows Search Function
Property : {}
PSPath : Microsoft.PowerShell.Core\Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Windows
Search
PSParentPath : Microsoft.PowerShell.Core\Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows
PSChildName : Windows Search
PSDrive : HKLM
PSProvider : Microsoft.PowerShell.Core\Registry
PSIsContainer : True
SubKeyCount : 0
View : Default
Handle : Microsoft.Win32.SafeHandles.SafeRegistryHandle
ValueCount : 0
Name : HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Windows Search
Disabling Bing Search in Start Menu
Property : {}
PSPath : Microsoft.PowerShell.Core\Registry::HKU\S-1-5-19\SOFTWARE\Microsoft\Windows\CurrentVersion\Search
PSParentPath : Microsoft.PowerShell.Core\Registry::HKU\S-1-5-19\SOFTWARE\Microsoft\Windows\CurrentVersion
PSChildName : Search
PSProvider : Microsoft.PowerShell.Core\Registry
PSIsContainer : True
SubKeyCount : 0
View : Default
Handle : Microsoft.Win32.SafeHandles.SafeRegistryHandle
ValueCount : 0
Name : HKEY_USERS\S-1-5-19\SOFTWARE\Microsoft\Windows\CurrentVersion\Search
Property : {}
PSPath : Microsoft.PowerShell.Core\Registry::HKU\S-1-5-20\SOFTWARE\Microsoft\Windows\CurrentVersion\Search
PSParentPath : Microsoft.PowerShell.Core\Registry::HKU\S-1-5-20\SOFTWARE\Microsoft\Windows\CurrentVersion
PSChildName : Search
PSProvider : Microsoft.PowerShell.Core\Registry
PSIsContainer : True
SubKeyCount : 0
View : Default
Handle : Microsoft.Win32.SafeHandles.SafeRegistryHandle
ValueCount : 0
Name : HKEY_USERS\S-1-5-20\SOFTWARE\Microsoft\Windows\CurrentVersion\Search
Stopping the Windows Feedback Experience program
Adding Registry key to prevent bloatware apps from returning
Property : {}
PSPath : Microsoft.PowerShell.Core\Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\CloudContent
PSParentPath : Microsoft.PowerShell.Core\Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows
PSChildName : CloudContent
PSDrive : HKLM
PSProvider : Microsoft.PowerShell.Core\Registry
PSIsContainer : True
SubKeyCount : 0
View : Default
Handle : Microsoft.Win32.SafeHandles.SafeRegistryHandle
ValueCount : 0
Name : HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\CloudContent
Property : {}
PSPath : Microsoft.PowerShell.Core\Registry::HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Content
DeliveryManager
PSParentPath : Microsoft.PowerShell.Core\Registry::HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion
PSChildName : ContentDeliveryManager
PSDrive : HKCU
PSProvider : Microsoft.PowerShell.Core\Registry
PSIsContainer : True
SubKeyCount : 0
View : Default
Handle : Microsoft.Win32.SafeHandles.SafeRegistryHandle
ValueCount : 0
Name : HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager
Setting Mixed Reality Portal value to 0 so that you can uninstall it in Settings
Disabling Wi-Fi Sense
Property : {}
PSPath : Microsoft.PowerShell.Core\Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PolicyManager\default\WiFi\Al
lowWiFiHotSpotReporting
PSParentPath : Microsoft.PowerShell.Core\Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PolicyManager\default\WiFi
PSChildName : AllowWiFiHotSpotReporting
PSDrive : HKLM
PSProvider : Microsoft.PowerShell.Core\Registry
PSIsContainer : True
SubKeyCount : 0
View : Default
Handle : Microsoft.Win32.SafeHandles.SafeRegistryHandle
ValueCount : 0
Name : HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PolicyManager\default\WiFi\AllowWiFiHotSpotReporting
Disabling live tiles
Property : {}
PSPath : Microsoft.PowerShell.Core\Registry::HKU\S-1-12-1-61240780-1337025491-4090725036-3748977976\SOFTWARE\Pol
icies\Microsoft\Windows\CurrentVersion\PushNotifications
PSParentPath : Microsoft.PowerShell.Core\Registry::HKU\S-1-12-1-61240780-1337025491-4090725036-3748977976\SOFTWARE\Pol
icies\Microsoft\Windows\CurrentVersion
PSChildName : PushNotifications
PSProvider : Microsoft.PowerShell.Core\Registry
PSIsContainer : True
SubKeyCount : 0
View : Default
Handle : Microsoft.Win32.SafeHandles.SafeRegistryHandle
ValueCount : 0
Name : HKEY_USERS\S-1-12-1-61240780-1337025491-4090725036-3748977976\SOFTWARE\Policies\Microsoft\Windows\Curre
ntVersion\PushNotifications
Property : {}
PSPath : Microsoft.PowerShell.Core\Registry::HKU\S-1-5-19\SOFTWARE\Policies\Microsoft\Windows\CurrentVersion\Pus
hNotifications
PSParentPath : Microsoft.PowerShell.Core\Registry::HKU\S-1-5-19\SOFTWARE\Policies\Microsoft\Windows\CurrentVersion
PSChildName : PushNotifications
PSProvider : Microsoft.PowerShell.Core\Registry
PSIsContainer : True
SubKeyCount : 0
View : Default
Handle : Microsoft.Win32.SafeHandles.SafeRegistryHandle
ValueCount : 0
Name : HKEY_USERS\S-1-5-19\SOFTWARE\Policies\Microsoft\Windows\CurrentVersion\PushNotifications
Property : {}
PSPath : Microsoft.PowerShell.Core\Registry::HKU\S-1-5-20\SOFTWARE\Policies\Microsoft\Windows\CurrentVersion\Pus
hNotifications
PSParentPath : Microsoft.PowerShell.Core\Registry::HKU\S-1-5-20\SOFTWARE\Policies\Microsoft\Windows\CurrentVersion
PSChildName : PushNotifications
PSProvider : Microsoft.PowerShell.Core\Registry
PSIsContainer : True
SubKeyCount : 0
View : Default
Handle : Microsoft.Win32.SafeHandles.SafeRegistryHandle
ValueCount : 0
Name : HKEY_USERS\S-1-5-20\SOFTWARE\Policies\Microsoft\Windows\CurrentVersion\PushNotifications
Disabling People icon on Taskbar
Disabling Cortana
Property : {}
PSPath : Microsoft.PowerShell.Core\Registry::HKEY_CURRENT_USER\SOFTWARE\Microsoft\InputPersonalization
PSParentPath : Microsoft.PowerShell.Core\Registry::HKEY_CURRENT_USER\SOFTWARE\Microsoft
PSChildName : InputPersonalization
PSDrive : HKCU
PSProvider : Microsoft.PowerShell.Core\Registry
PSIsContainer : True
SubKeyCount : 0
View : Default
Handle : Microsoft.Win32.SafeHandles.SafeRegistryHandle
ValueCount : 0
Name : HKEY_CURRENT_USER\SOFTWARE\Microsoft\InputPersonalization
Property : {}
PSPath : Microsoft.PowerShell.Core\Registry::HKEY_CURRENT_USER\SOFTWARE\Microsoft\InputPersonalization\TrainedDa
taStore
PSParentPath : Microsoft.PowerShell.Core\Registry::HKEY_CURRENT_USER\SOFTWARE\Microsoft\InputPersonalization
PSChildName : TrainedDataStore
PSDrive : HKCU
PSProvider : Microsoft.PowerShell.Core\Registry
PSIsContainer : True
SubKeyCount : 0
View : Default
Handle : Microsoft.Win32.SafeHandles.SafeRegistryHandle
ValueCount : 0
Name : HKEY_CURRENT_USER\SOFTWARE\Microsoft\InputPersonalization\TrainedDataStore
Removing 3D Objects from explorer ‘My Computer’ submenu
Disabling scheduled tasks
Actions : {MSFT_TaskExecAction}
Author : Microsoft
Date :
Description : XblGameSave Standby Task
Documentation :
Principal : MSFT_TaskPrincipal2
SecurityDescriptor :
Settings : MSFT_TaskSettings3
Source :
State : Disabled
TaskName : XblGameSaveTask
TaskPath : \Microsoft\XblGameSave\
Triggers : {MSFT_TaskIdleTrigger}
URI : \Microsoft\XblGameSave\XblGameSaveTask
Version :
PSComputerName :
Actions : {MSFT_TaskExecAction}
Author : Microsoft Corporation
Date :
Description : If the user has consented to participate in the Windows Customer Experience Improvement Program,
this job collects and sends usage data to Microsoft.
Documentation :
Principal : MSFT_TaskPrincipal2
SecurityDescriptor : D:(A;OICI;FA;;;BA)(A;OICI;FA;;;SY)(A;OICI;GRGX;;;AU)
Settings : MSFT_TaskSettings3
Source : Windows Customer Experience Improvement Program
State : Disabled
TaskName : Consolidator
TaskPath : \Microsoft\Windows\Customer Experience Improvement Program\
Triggers : {MSFT_TaskTimeTrigger}
URI : \Microsoft\Windows\Customer Experience Improvement Program\Consolidator
Version : 1.0
PSComputerName :
Actions : {MSFT_TaskComHandlerAction}
Author : Microsoft Corporation
Date :
Description : The USB CEIP (Customer Experience Improvement Program) task collects Universal Serial Bus related
statistics and information about your machine and sends it to the Windows Device Connectivity
engineering group at Microsoft. The information received is used to help improve the
reliability, stability, and overall functionality of USB in Windows. If the user has not
consented to participate in Windows CEIP, this task does not do anything.
Documentation :
Principal : MSFT_TaskPrincipal2
SecurityDescriptor : D:(A;OICI;FA;;;BA)(A;OICI;FA;;;SY)(A;OICI;GRGX;;;AU)(A;OICI;SD;;;S-1-5-87-1060603329-121822201-345
2730971-4292368946-61207722)(A;;FRFX;;;LS)
Settings : MSFT_TaskSettings3
Source : Microsoft Corporation
State : Disabled
TaskName : UsbCeip
TaskPath : \Microsoft\Windows\Customer Experience Improvement Program\
Triggers :
URI : \Microsoft\Windows\Customer Experience Improvement Program\UsbCeip
Version : 1.0
PSComputerName :
Actions : {MSFT_TaskExecAction}
Author : Microsoft Windows Feedback
Date :
Description : Update SIUF strings
Documentation :
Principal : MSFT_TaskPrincipal2
SecurityDescriptor :
Settings : MSFT_TaskSettings3
Source : System Initiated User Feedback
State : Disabled
TaskName : DmClient
TaskPath : \Microsoft\Windows\Feedback\Siuf\
Triggers :
URI : \Microsoft\Windows\Feedback\Siuf\DmClient
Version :
PSComputerName :
Actions : {MSFT_TaskExecAction}
Author : Microsoft Windows Feedback
Date :
Description : Update SIUF strings
Documentation :
Principal : MSFT_TaskPrincipal2
SecurityDescriptor :
Settings : MSFT_TaskSettings3
Source : System Initiated User Feedback
State : Disabled
TaskName : DmClientOnScenarioDownload
TaskPath : \Microsoft\Windows\Feedback\Siuf\
Triggers : {MSFT_TaskTrigger}
URI : \Microsoft\Windows\Feedback\Siuf\DmClientOnScenarioDownload
Version :
PSComputerName :
Removing Windows 11 Customisations
Removed Microsoft.XboxGamingOverlay
PS>TerminatingError(Remove-AppxPackage): “Removal failed. Please contact your software vendor.
Deployment DeStage operation with target volume C: on Package Microsoft.XboxGameCallableUI_1000.22621.1.0_neutral_neutral_cw5n1h2txyewy from: failed with error 0x80070032. See http://go.microsoft.com/fwlink/?LinkId=235160 for help diagnosing app deployment issues.”
Removed Microsoft.XboxGameCallableUI
Removed Microsoft.549981C3F5F10
Removed *getstarted*
PS>TerminatingError(Remove-AppxPackage): “Removal failed. Please contact your software vendor.
Deployment DeStage operation with target volume C: on Package Microsoft.Windows.ParentalControls_1000.22621.1.0_neutral_neutral_cw5n1h2txyewy from: failed with error 0x80070032. See http://go.microsoft.com/fwlink/?LinkId=235160 for help diagnosing app deployment issues.”
Removed Microsoft.Windows.ParentalControls
Removed Teams Chat
Removing Windows Copilot
Removed
Clearing Start Menu
Windows 11 Detected
Removing Current Layout
GamePresenceWriter.exe does not exist
SettingsPageVisibility : hide:gaming-gamebar;gaming-gamedvr;gaming-broadcasting;gaming-gamemode;gaming-xboxnetworking
PSPath : Microsoft.PowerShell.Core\Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersi
on\Policies\Explorer
PSParentPath : Microsoft.PowerShell.Core\Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersi
on\Policies
PSChildName : Explorer
PSDrive : HKLM
PSProvider : Microsoft.PowerShell.Core\Registry
Checking 32-bit System Registry
32-bit check complete
Checking 64-bit System registry
64-bit checks complete
Checking 32-bit User Registry
32-bit check complete
Checking 64-bit Use registry
Detecting Manufacturer
Dell detected
Detecting McAfee
Completed
**********************
Windows PowerShell transcript end
End time: 20240509103644
**********************
Can you email me a screenshot of how the app is deployed in Intune so I can have a look at the settings?
Yeah sure. What email do you want me to use.
Use andrew.taylor @ this domain
Yeah am i missing something
Without seeing the full intunewin file, how it’s deployed etc. it’s very difficult to say.
Thanks for your help earlier. Getting an error now running it via scripts saying the hash does not match hash stored in the digital signature. Guessing I need to re-sign it?
If you have edited the script yes, you’ll need to either remove the signature, or re-sign it if you have a code signing cert
Hi,
Just set this up as a WIN32 app and getting the following error
0x80070001.
Been troubleshooting for a day and cannot find anything on it.
Where do you get that error?
From Intune App device install status. Today’s new error message is
Failed to retrieve content information. (0x87D30065)
Thats after I changed the install command to %SystemRoot%\SysNative\WindowsPowerShell\v1.0\powershell.exe -executionpolicy bypass -file debloat-intune-script.ps1
What’s inside the intunewin file?
Is it creating a log file, or just failing completely?
No log file at all. I ran it manually on the device and it worked fine.
Does the intunewin file include just the debloat-intune-script?
I’m having to run this ad-hoc after software is installed and users are logged in as we didn’t remove bloatware during deployment for a while. What section do I need to comment out/delete to keep software installed?
It entirely depends on the software, for manufacturer stuff you’ll need to remove the section for your manufacturer.
For any windows apps, remove from the list at the top
I mean any software that has been installed manually such as firefox, notepad++.
It won’t do anything with those on an in-use machine
I’m not sure what’s happening, but this app strips out calculator, notepad, camera etc even though they are whitelisted by default. Any ideas?
Do you have anything else configured? Can you send over the logs?
Am I being daft or missing something? Shouldn’t the checks for Install and Provisioned Dell apps use notIN, rather than notLIKE when checking against the whitelists? Otherwise the whitelist is ignored unless it only contains a single item.
Well spotted, updated now. Ideally I’d have one of each manufacturer for testing
Ah, nice one. There’s a similar line for HP too. Great script, really useful for me, thanks!
I fixed that when you pointed out the Dell one 🙂
##Belt and braces, remove via CIM too
foreach ($program in $UninstallPrograms) {
Get-CimInstance -Classname Win32_Product | Where-Object Name -Match $program | Invoke-CimMethod -MethodName UnInstall
}
This also ignores the whitelist so removes programs like Dell Command update too.
If we remove the contents of $WhitelistApps from $UninstallPrograms prior to this command I think it should resolve this.
$UninstallPrograms = $UninstallPrograms | Where-Object{$WhitelistApps -notcontains $_}
I’ve added that now for Dell and HP (I’d already done it for Lenovo for some reason)
Hi Andrew,
I am running the script standalone (RemoveBloat.ps1) with no other scripts or anything calling it (deploying through our endpoint management software we use).
I am trying to whitelist some apps (Dell Command Update, WaveMaxx Audio software) but the keep getting uninstalled – can you advise why?
Hi Gary, have you configured the whitelist for them?
I’ve done it like this – please advise if anything is wrong:
############################################################################################################
# Remove Manufacturer Bloat #
# #
############################################################################################################
##Check Manufacturer
write-host “Detecting Manufacturer”
$details = Get-CimInstance -ClassName Win32_ComputerSystem
$manufacturer = $details.Manufacturer
if ($manufacturer -like “*Dell*”) {
Write-Host “Dell detected”
#Remove Dell bloat
##Dell
$UninstallPrograms = @(
“Dell Optimizer”
“Dell Power Manager”
“DellOptimizerUI”
“Dell SupportAssist OS Recovery”
“Dell SupportAssist”
“Dell Optimizer Service”
“Dell Optimizer Core”
“DellInc.PartnerPromo”
“DellInc.DellOptimizer”
“DellInc.DellCommandUpdate”
“DellInc.DellPowerManager”
“DellInc.DellDigitalDelivery”
“*DellInc.DellDigitalDelivery*”
“DellInc.DellSupportAssistforPCs”
“DellInc.PartnerPromo”
“Dell Command | Update”
“Dell Command | Update for Windows Universal”
“Dell Command | Update for Windows 10”
“Dell Command | Power Manager”
“Dell Digital Delivery Service”
“Dell Digital Delivery”
“Dell Peripheral Manager”
“Dell Power Manager Service”
“Dell SupportAssist Remediation”
“SupportAssist Recovery Assistant”
“Dell SupportAssist OS Recovery Plugin for Dell Update”
“Dell SupportAssistAgent”
“Dell Update – SupportAssist Update Plugin”
“Dell Core Services”
“Dell Pair”
“Dell Display Manager 2.0”
“Dell Display Manager 2.1”
“Dell Display Manager 2.2”
“Dell SupportAssist Remediation”
“Dell Update – SupportAssist Update Plugin”
“DellInc.PartnerPromo”
“DellInc.MyDell”
)
$WhitelistedApps = @(
“WavesAudio.MaxxAudioProforDell2019”
“WavesAudio.MaxxAudioProforDell*”
“Dell – Extension*”
“Dell, Inc. – Firmware*”
“Dell Command | Update*”
“DellInc.DellCommandUpdate*”
)
##Add custom whitelist apps
##If custom whitelist specified, remove from array
if ($customwhitelist) {
$customWhitelistApps = $customwhitelist -split “,”
foreach ($customwhitelistapp in $customwhitelistapps) {
$WhitelistedApps += $customwhitelistapp
}
}
$ProvisionedPackages = Get-AppxProvisionedPackage -Online | Where-Object {(($_.Name -in $UninstallPrograms) -or ($_.Name -like “*Dell*”)) -and ($_.Name -NotMatch $WhitelistedApps)}
$InstalledPackages = Get-AppxPackage -AllUsers | Where-Object {(($_.Name -in $UninstallPrograms) -or ($_.Name -like “*Dell*”)) -and ($_.Name -NotMatch $WhitelistedApps)}
$InstalledPrograms = $allstring | Where-Object {(($_.Name -in $UninstallPrograms) -or ($_.Name -like “*Dell*”)) -and ($_.Name -NotMatch $WhitelistedApps)}
# Remove provisioned packages first
ForEach ($ProvPackage in $ProvisionedPackages) {
Write-Host -Object “Attempting to remove provisioned package: [$($ProvPackage.DisplayName)]…”
Try {
$Null = Remove-AppxProvisionedPackage -PackageName $ProvPackage.PackageName -Online -ErrorAction Stop
Write-Host -Object “Successfully removed provisioned package: [$($ProvPackage.DisplayName)]”
}
Catch {Write-Warning -Message “Failed to remove provisioned package: [$($ProvPackage.DisplayName)]”}
}
# Remove appx packages
ForEach ($AppxPackage in $InstalledPackages) {
Write-Host -Object “Attempting to remove Appx package: [$($AppxPackage.Name)]…”
Try {
$Null = Remove-AppxPackage -Package $AppxPackage.PackageFullName -AllUsers -ErrorAction Stop
Write-Host -Object “Successfully removed Appx package: [$($AppxPackage.Name)]”
}
Catch {Write-Warning -Message “Failed to remove Appx package: [$($AppxPackage.Name)]”}
}
# Remove any bundled packages
ForEach ($AppxPackage in $InstalledPackages) {
Write-Host -Object “Attempting to remove Appx package: [$($AppxPackage.Name)]…”
Try {
$null = Get-AppxPackage -AllUsers -PackageTypeFilter Main, Bundle, Resource -Name $AppxPackage.Name | Remove-AppxPackage -AllUsers
Write-Host -Object “Successfully removed Appx package: [$($AppxPackage.Name)]”
}
Catch {Write-Warning -Message “Failed to remove Appx package: [$($AppxPackage.Name)]”}
}
$ExcludedPrograms = @(“Dell Optimizer Core”, “Dell SupportAssist Remediation”, “Dell SupportAssist OS Recovery Plugin for Dell Update”, “Dell Pair”, “Dell Display Manager 2.0”, “Dell Display Manager 2.1”, “Dell Display Manager 2.2”, “Dell Peripheral Manager”)
$InstalledPrograms2 = $InstalledPrograms | Where-Object { $ExcludedPrograms -notcontains $_.Name }
# Remove installed programs
$InstalledPrograms2 | ForEach-Object {
Write-Host -Object “Attempting to uninstall: [$($_.Name)]…”
$uninstallcommand = $_.String
Try {
if ($uninstallcommand -match “^msiexec*”) {
#Remove msiexec as we need to split for the uninstall
$uninstallcommand = $uninstallcommand -replace “msiexec.exe”, “”
$uninstallcommand = $uninstallcommand + ” /quiet /norestart”
$uninstallcommand = $uninstallcommand -replace “/I”, “/X ”
#Uninstall with string2 params
Start-Process ‘msiexec.exe’ -ArgumentList $uninstallcommand -NoNewWindow -Wait
}
else {
#Exe installer, run straight path
$string2 = $uninstallcommand
start-process $string2
}
#$A = Start-Process -FilePath $uninstallcommand -Wait -passthru -NoNewWindow;$a.ExitCode
#$Null = $_ | Uninstall-Package -AllVersions -Force -ErrorAction Stop
Write-Host -Object “Successfully uninstalled: [$($_.Name)]”
}
Catch {Write-Warning -Message “Failed to uninstall: [$($_.Name)]”}
}
##Belt and braces, remove via CIM too
foreach ($program in $UninstallPrograms) {
Get-CimInstance -Classname Win32_Product | Where-Object Name -Match $program | Invoke-CimMethod -MethodName UnInstall
}
##Manual Removals
##Dell Optimizer
$dellSA = Get-ChildItem -Path HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall, HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall | Get-ItemProperty | Where-Object { $_.DisplayName -like “Dell*Optimizer*Core” } | Select-Object -Property UninstallString
ForEach ($sa in $dellSA) {
If ($sa.UninstallString) {
try {
cmd.exe /c $sa.UninstallString -silent
}
catch {
Write-Warning “Failed to uninstall Dell Optimizer”
}
}
}
##Dell Dell SupportAssist Remediation
$dellSA = Get-ChildItem -Path HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall, HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall | Get-ItemProperty | Where-Object { $_.DisplayName -match “Dell SupportAssist Remediation” } | Select-Object -Property QuietUninstallString
ForEach ($sa in $dellSA) {
If ($sa.QuietUninstallString) {
try {
cmd.exe /c $sa.QuietUninstallString
}
catch {
Write-Warning “Failed to uninstall Dell Support Assist Remediation”
} }
}
##Dell Dell SupportAssist OS Recovery Plugin for Dell Update
$dellSA = Get-ChildItem -Path HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall, HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall | Get-ItemProperty | Where-Object { $_.DisplayName -match “Dell SupportAssist OS Recovery Plugin for Dell Update” } | Select-Object -Property QuietUninstallString
ForEach ($sa in $dellSA) {
If ($sa.QuietUninstallString) {
try {
cmd.exe /c $sa.QuietUninstallString
}
catch {
Write-Warning “Failed to uninstall Dell Support Assist Remediation”
} }
}
##Dell Display Manager
$dellSA = Get-ChildItem -Path HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall, HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall | Get-ItemProperty | Where-Object { $_.DisplayName -like “Dell*Display*Manager*” } | Select-Object -Property UninstallString
ForEach ($sa in $dellSA) {
If ($sa.UninstallString) {
try {
cmd.exe /c $sa.UninstallString /S
}
catch {
Write-Warning “Failed to uninstall Dell Optimizer”
}
}
}
##Dell Peripheral Manager
try {
start-process c:\windows\system32\cmd.exe ‘/c “C:\Program Files\Dell\Dell Peripheral Manager\Uninstall.exe” /S’
}
catch {
Write-Warning “Failed to uninstall Dell Optimizer”
}
##Dell Pair
try {
start-process c:\windows\system32\cmd.exe ‘/c “C:\Program Files\Dell\Dell Pair\Uninstall.exe” /S’
}
catch {
Write-Warning “Failed to uninstall Dell Optimizer”
}
}
Can you try changing -notmatch to -notlike and see if that makes a difference? If that works, I’ll update the main script
It still got removed unfortunately
Try this:
$ProvisionedPackages = Get-AppxProvisionedPackage -Online | Where-Object {(($UninstallPrograms -contains $_.DisplayName) -or ($_.DisplayName -like “*Dell”))-and ($_.DisplayName -notlike $WhitelistedApps)}
$InstalledPackages = Get-AppxPackage -AllUsers | Where-Object {(($UninstallPrograms -contains $_.Name) -or ($_.Name -like “*Dell”))-and ($_.Name -notlike $WhitelistedApps)}
$InstalledPrograms = $allstring | Where-Object {$UninstallPrograms -contains $_.Name}
HI Andrew,
That didn’t seem to work either. It still removed it.
Can you email me your script and I’ll have a look for you
Hi Andrew,
Thank you for all the time you’ve put into this. I’m just looking for this script to only remove manufacturers bloat (specifically Dell but happy to leave the others).
I’ve made changes to the script and wondering if you can confirm if it will still work after my changes to do the above.
Cheers,
Jason C.
Hi,
Can you email me the script and I’ll have a look for you
Thank you – will do.
I have the script set as a device platform script linked to a single laptop configured to a pre-prov autopilot profile. The issue I seem to be having is that the script actually runs twice I noticed this in doing some debugging and actually put a timestamp into the logfile name in my forked version and yes, it generates 2 separate logs. My forked version of the debloat script is being called directly from intune, without the secondary script for now.
I can’t see any reason it would be getting called twice during the preprov.
I’m thinking maybe creating a tag file similar to what Michael Niehaus does with some of his scripts. Checking for the tag file at the start of the script would emulate the detection behavior for Win32apps.
Can anyone think og why the script would be getting executed twice ?
A curly brace is missing in the Lenovo routine
At C:\ProgramData\Debloat\removebloat.ps1:1554 char:35
+ if ($manufacturer -like “Lenovo”) {
+ ~
Missing closing ‘}’ in statement block or type definition.
+ CategoryInfo : ParserError: (:) [], ParseException
+ FullyQualifiedErrorId : MissingEndCurlyBrace
Thank you, fixed now
If I just whitelist ‘lenovo’ will that whitelist anything lenovo? We typically use Commerical Advantage for BIOS updates, et al. However the Lenovo section of the script is lengthy and I don’t want to accidently remove anything my org utilizes.
The whitelist is an exact match so that couldn’t work if using the custom whitelist option. You could edit the apps listed in the Lenovo section though and amend to your requirements
Win11 EDU 23H2
The errors mostly seem related to the HKU tree. I resolved some of them by explicitly making a psdrive for HKU, but I’m not a good enuf PS wiz to sort the flush method error out.
Keith
Can you send me the errors? I’ll have a look and see what I can do
I’ll see if I can recreate and capture the errors for you.
I’m running the full script as a now against W11Edu 22h2 on HP laptops during Pre-provision.
1.Should there be any issue with it running during pre-prov?
a)Even though this is being run against the factory image prior to any user login, it seems to be sensing either intune apps or a non-admin user and so doesn’t enter the “Other win32 apps”
b) during the HP debloat it seems to want to pick up and try to uninstall packages that were excluded in the regular windows debloat ?
Might this have to do with the fact it is running pre-prov so there is no “user” signed in ??
I’m doing some further debug with some extra write-hosts to try and track the pertinent “trigger” variables.
Keith
It should run fine during pre-prov, are you deploying as an app or a platform script?
Can you email me the logs it generates and I’ll see what it’s doing
I have all the logs as well as the actions sequence. Can you send me an email I can reply to address with the files ?
Thanks for all your work !!
Hi Andrew,
This is a great script !
I do notice though that the Copilot removal section doesn’t work if $ErrorActionPreference = ‘silentlycontinue’ is removed from the start of the script.
Is this intentional ?
Hi Keith,
Which OS are you running on? That command fails on certain Windows versions
Hi Andrew,
Thank you for a fantasic job on your De-Bloat script. It works allmust perfect. It even managed to remove McAfee (except for the Pined Icon on the taskbar – minor detail).
But it did not manage to uninstall the worst app of them all (for me); Microsoft 365 – en-us (Office) and OneDrive.
My log:
**********************
Windows PowerShell transcript start
Start time: 20240409131023
Username: DESKTOP-EVP7E5S\TP
RunAs User: DESKTOP-EVP7E5S\TP
Configuration Name:
Machine: DESKTOP-EVP7E5S (Microsoft Windows NT 10.0.19044.0)
Host Application: C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe -NoProfile -ExecutionPolicy Bypass -File D:\Debloat\De-Bloat_Script\RemoveBloat.ps1 -WhitelistApps
Process ID: 11216
PSVersion: 5.1.19041.1320
PSEdition: Desktop
PSCompatibleVersions: 1.0, 2.0, 3.0, 4.0, 5.0, 5.1.19041.1320
BuildVersion: 10.0.19041.1320
CLRVersion: 4.0.30319.42000
WSManStackVersion: 3.0
PSRemotingProtocolVersion: 2.3
SerializationVersion: 1.1.0.1
**********************
Transcript started, output file is C:\ProgramData\Debloat\Debloat.log
Microsoft.549981C3F5F10 not found.
Provisioned package for Microsoft.549981C3F5F10 not found.
Microsoft.BingNews not found.
Provisioned package for Microsoft.BingNews not found.
Microsoft.GetHelp not found.
Provisioned package for Microsoft.GetHelp not found.
Microsoft.Getstarted not found.
Provisioned package for Microsoft.Getstarted not found.
Microsoft.Messaging not found.
Provisioned package for Microsoft.Messaging not found.
Microsoft.Microsoft3DViewer not found.
Provisioned package for Microsoft.Microsoft3DViewer not found.
Microsoft.MicrosoftOfficeHub not found.
Provisioned package for Microsoft.MicrosoftOfficeHub not found.
Microsoft.MicrosoftSolitaireCollection not found.
Provisioned package for Microsoft.MicrosoftSolitaireCollection not found.
Microsoft.NetworkSpeedTest not found.
Provisioned package for Microsoft.NetworkSpeedTest not found.
Microsoft.MixedReality.Portal not found.
Provisioned package for Microsoft.MixedReality.Portal not found.
Microsoft.News not found.
Provisioned package for Microsoft.News not found.
Microsoft.Office.Lens not found.
Provisioned package for Microsoft.Office.Lens not found.
Microsoft.Office.OneNote not found.
Provisioned package for Microsoft.Office.OneNote not found.
Microsoft.Office.Sway not found.
Provisioned package for Microsoft.Office.Sway not found.
Microsoft.OneConnect not found.
Provisioned package for Microsoft.OneConnect not found.
Microsoft.People not found.
Provisioned package for Microsoft.People not found.
Microsoft.Print3D not found.
Provisioned package for Microsoft.Print3D not found.
Microsoft.RemoteDesktop not found.
Provisioned package for Microsoft.RemoteDesktop not found.
Microsoft.SkypeApp not found.
Provisioned package for Microsoft.SkypeApp not found.
Microsoft.StorePurchaseApp not found.
Provisioned package for Microsoft.StorePurchaseApp not found.
Microsoft.Office.Todo.List not found.
Provisioned package for Microsoft.Office.Todo.List not found.
Microsoft.Whiteboard not found.
Provisioned package for Microsoft.Whiteboard not found.
Microsoft.WindowsAlarms not found.
Provisioned package for Microsoft.WindowsAlarms not found.
microsoft.windowscommunicationsapps not found.
Provisioned package for microsoft.windowscommunicationsapps not found.
Microsoft.WindowsFeedbackHub not found.
Provisioned package for Microsoft.WindowsFeedbackHub not found.
Microsoft.WindowsMaps not found.
Provisioned package for Microsoft.WindowsMaps not found.
Microsoft.WindowsSoundRecorder not found.
Provisioned package for Microsoft.WindowsSoundRecorder not found.
Microsoft.Xbox.TCUI not found.
Provisioned package for Microsoft.Xbox.TCUI not found.
Microsoft.XboxApp not found.
Provisioned package for Microsoft.XboxApp not found.
Microsoft.XboxGameOverlay not found.
Provisioned package for Microsoft.XboxGameOverlay not found.
Microsoft.XboxIdentityProvider not found.
Provisioned package for Microsoft.XboxIdentityProvider not found.
Microsoft.XboxSpeechToTextOverlay not found.
Provisioned package for Microsoft.XboxSpeechToTextOverlay not found.
Microsoft.ZuneMusic not found.
Provisioned package for Microsoft.ZuneMusic not found.
Microsoft.ZuneVideo not found.
Provisioned package for Microsoft.ZuneVideo not found.
MicrosoftTeams not found.
Provisioned package for MicrosoftTeams not found.
Microsoft.YourPhone not found.
Provisioned package for Microsoft.YourPhone not found.
Microsoft.XboxGamingOverlay_5.721.10202.0_neutral_~_8wekyb3d8bbwe not found.
Provisioned package for Microsoft.XboxGamingOverlay_5.721.10202.0_neutral_~_8wekyb3d8bbwe not found.
Microsoft.GamingApp not found.
Provisioned package for Microsoft.GamingApp not found.
Microsoft.Todos not found.
Provisioned package for Microsoft.Todos not found.
Microsoft.PowerAutomateDesktop not found.
Provisioned package for Microsoft.PowerAutomateDesktop not found.
SpotifyAB.SpotifyMusic not found.
Provisioned package for SpotifyAB.SpotifyMusic not found.
Microsoft.MicrosoftJournal not found.
Provisioned package for Microsoft.MicrosoftJournal not found.
Disney.37853FC22B2CE not found.
Provisioned package for Disney.37853FC22B2CE not found.
*EclipseManager* not found.
Provisioned package for *EclipseManager* not found.
*ActiproSoftwareLLC* not found.
Provisioned package for *ActiproSoftwareLLC* not found.
*AdobeSystemsIncorporated.AdobePhotoshopExpress* not found.
Provisioned package for *AdobeSystemsIncorporated.AdobePhotoshopExpress* not found.
*Duolingo-LearnLanguagesforFree* not found.
Provisioned package for *Duolingo-LearnLanguagesforFree* not found.
*PandoraMediaInc* not found.
Provisioned package for *PandoraMediaInc* not found.
*CandyCrush* not found.
Provisioned package for *CandyCrush* not found.
*BubbleWitch3Saga* not found.
Provisioned package for *BubbleWitch3Saga* not found.
*Wunderlist* not found.
Provisioned package for *Wunderlist* not found.
*Flipboard* not found.
Provisioned package for *Flipboard* not found.
*Twitter* not found.
Provisioned package for *Twitter* not found.
*Facebook* not found.
Provisioned package for *Facebook* not found.
*Spotify* not found.
Provisioned package for *Spotify* not found.
*Minecraft* not found.
Provisioned package for *Minecraft* not found.
*Royal Revolt* not found.
Provisioned package for *Royal Revolt* not found.
*Sway* not found.
Provisioned package for *Sway* not found.
*Speed Test* not found.
Provisioned package for *Speed Test* not found.
Removed *Dolby*.
Provisioned package for *Dolby* not found.
*Office* not found.
Provisioned package for *Office* not found.
*Disney* not found.
Provisioned package for *Disney* not found.
clipchamp.clipchamp not found.
Provisioned package for clipchamp.clipchamp not found.
*gaming* not found.
Provisioned package for *gaming* not found.
MicrosoftCorporationII.MicrosoftFamily not found.
Provisioned package for MicrosoftCorporationII.MicrosoftFamily not found.
C27EB4BA.DropboxOEM* not found.
Provisioned package for C27EB4BA.DropboxOEM* not found.
*DevHome* not found.
Provisioned package for *DevHome* not found.
Removing HKCR:\Extensions\ContractId\Windows.BackgroundTasks\PackageId\46928bounde.EclipseManager_2.2.4.51_neutral__a5h4egax66k6y from registry
Removing HKCR:\Extensions\ContractId\Windows.BackgroundTasks\PackageId\ActiproSoftwareLLC.562882FEEB491_2.6.18.18_neutral__24pqs290vpjk0 from registry
Removing HKCR:\Extensions\ContractId\Windows.BackgroundTasks\PackageId\Microsoft.MicrosoftOfficeHub_17.7909.7600.0_x64__8wekyb3d8bbwe from registry
Removing HKCR:\Extensions\ContractId\Windows.BackgroundTasks\PackageId\Microsoft.PPIProjection_10.0.15063.0_neutral_neutral_cw5n1h2txyewy from registry
Removing HKCR:\Extensions\ContractId\Windows.BackgroundTasks\PackageId\Microsoft.XboxGameCallableUI_1000.15063.0.0_neutral_neutral_cw5n1h2txyewy from registry
Removing HKCR:\Extensions\ContractId\Windows.BackgroundTasks\PackageId\Microsoft.XboxGameCallableUI_1000.16299.15.0_neutral_neutral_cw5n1h2txyewy from registry
Removing HKCR:\Extensions\ContractId\Windows.File\PackageId\ActiproSoftwareLLC.562882FEEB491_2.6.18.18_neutral__24pqs290vpjk0 from registry
Removing HKCR:\Extensions\ContractId\Windows.Launch\PackageId\46928bounde.EclipseManager_2.2.4.51_neutral__a5h4egax66k6y from registry
Removing HKCR:\Extensions\ContractId\Windows.Launch\PackageId\ActiproSoftwareLLC.562882FEEB491_2.6.18.18_neutral__24pqs290vpjk0 from registry
Removing HKCR:\Extensions\ContractId\Windows.Launch\PackageId\Microsoft.PPIProjection_10.0.15063.0_neutral_neutral_cw5n1h2txyewy from registry
Removing HKCR:\Extensions\ContractId\Windows.Launch\PackageId\Microsoft.XboxGameCallableUI_1000.15063.0.0_neutral_neutral_cw5n1h2txyewy from registry
Removing HKCR:\Extensions\ContractId\Windows.Launch\PackageId\Microsoft.XboxGameCallableUI_1000.16299.15.0_neutral_neutral_cw5n1h2txyewy from registry
Removing HKCR:\Extensions\ContractId\Windows.PreInstalledConfigTask\PackageId\Microsoft.MicrosoftOfficeHub_17.7909.7600.0_x64__8wekyb3d8bbwe from registry
Removing HKCR:\Extensions\ContractId\Windows.Protocol\PackageId\ActiproSoftwareLLC.562882FEEB491_2.6.18.18_neutral__24pqs290vpjk0 from registry
Removing HKCR:\Extensions\ContractId\Windows.Protocol\PackageId\Microsoft.PPIProjection_10.0.15063.0_neutral_neutral_cw5n1h2txyewy from registry
Removing HKCR:\Extensions\ContractId\Windows.Protocol\PackageId\Microsoft.XboxGameCallableUI_1000.15063.0.0_neutral_neutral_cw5n1h2txyewy from registry
Removing HKCR:\Extensions\ContractId\Windows.Protocol\PackageId\Microsoft.XboxGameCallableUI_1000.16299.15.0_neutral_neutral_cw5n1h2txyewy from registry
Removing HKCR:\Extensions\ContractId\Windows.ShareTarget\PackageId\ActiproSoftwareLLC.562882FEEB491_2.6.18.18_neutral__24pqs290vpjk0 from registry
Disabling Windows Feedback Experience program
Stopping Cortana from being used as part of your Windows Search Function
Property : {}
PSPath : Microsoft.PowerShell.Core\Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Windows Search
PSParentPath : Microsoft.PowerShell.Core\Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows
PSChildName : Windows Search
PSDrive : HKLM
PSProvider : Microsoft.PowerShell.Core\Registry
PSIsContainer : True
SubKeyCount : 0
View : Default
Handle : Microsoft.Win32.SafeHandles.SafeRegistryHandle
ValueCount : 0
Name : HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Windows Search
Disabling Bing Search in Start Menu
Property : {}
PSPath : Microsoft.PowerShell.Core\Registry::HKU\S-1-5-19\SOFTWARE\Microsoft\Windows\CurrentVersion\Search
PSParentPath : Microsoft.PowerShell.Core\Registry::HKU\S-1-5-19\SOFTWARE\Microsoft\Windows\CurrentVersion
PSChildName : Search
PSProvider : Microsoft.PowerShell.Core\Registry
PSIsContainer : True
SubKeyCount : 0
View : Default
Handle : Microsoft.Win32.SafeHandles.SafeRegistryHandle
ValueCount : 0
Name : HKEY_USERS\S-1-5-19\SOFTWARE\Microsoft\Windows\CurrentVersion\Search
Property : {}
PSPath : Microsoft.PowerShell.Core\Registry::HKU\S-1-5-20\SOFTWARE\Microsoft\Windows\CurrentVersion\Search
PSParentPath : Microsoft.PowerShell.Core\Registry::HKU\S-1-5-20\SOFTWARE\Microsoft\Windows\CurrentVersion
PSChildName : Search
PSProvider : Microsoft.PowerShell.Core\Registry
PSIsContainer : True
SubKeyCount : 0
View : Default
Handle : Microsoft.Win32.SafeHandles.SafeRegistryHandle
ValueCount : 0
Name : HKEY_USERS\S-1-5-20\SOFTWARE\Microsoft\Windows\CurrentVersion\Search
Stopping the Windows Feedback Experience program
Adding Registry key to prevent bloatware apps from returning
Property : {}
PSPath : Microsoft.PowerShell.Core\Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\CloudContent
PSParentPath : Microsoft.PowerShell.Core\Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows
PSChildName : CloudContent
PSDrive : HKLM
PSProvider : Microsoft.PowerShell.Core\Registry
PSIsContainer : True
SubKeyCount : 0
View : Default
Handle : Microsoft.Win32.SafeHandles.SafeRegistryHandle
ValueCount : 0
Name : HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\CloudContent
Property : {}
PSPath : Microsoft.PowerShell.Core\Registry::HKU\S-1-5-18\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager
PSParentPath : Microsoft.PowerShell.Core\Registry::HKU\S-1-5-18\SOFTWARE\Microsoft\Windows\CurrentVersion
PSChildName : ContentDeliveryManager
PSProvider : Microsoft.PowerShell.Core\Registry
PSIsContainer : True
SubKeyCount : 0
View : Default
Handle : Microsoft.Win32.SafeHandles.SafeRegistryHandle
ValueCount : 0
Name : HKEY_USERS\S-1-5-18\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager
Setting Mixed Reality Portal value to 0 so that you can uninstall it in Settings
Disabling Wi-Fi Sense
Property : {}
PSPath : Microsoft.PowerShell.Core\Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PolicyManager\default\WiFi\AllowWiFiHotSpotReporting
PSParentPath : Microsoft.PowerShell.Core\Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PolicyManager\default\WiFi
PSChildName : AllowWiFiHotSpotReporting
PSDrive : HKLM
PSProvider : Microsoft.PowerShell.Core\Registry
PSIsContainer : True
SubKeyCount : 0
View : Default
Handle : Microsoft.Win32.SafeHandles.SafeRegistryHandle
ValueCount : 0
Name : HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PolicyManager\default\WiFi\AllowWiFiHotSpotReporting
Disabling live tiles
Property : {}
PSPath : Microsoft.PowerShell.Core\Registry::HKEY_CURRENT_USER\SOFTWARE\Policies\Microsoft\Windows\CurrentVersion\PushNotifications
PSParentPath : Microsoft.PowerShell.Core\Registry::HKEY_CURRENT_USER\SOFTWARE\Policies\Microsoft\Windows\CurrentVersion
PSChildName : PushNotifications
PSDrive : HKCU
PSProvider : Microsoft.PowerShell.Core\Registry
PSIsContainer : True
SubKeyCount : 0
View : Default
Handle : Microsoft.Win32.SafeHandles.SafeRegistryHandle
ValueCount : 0
Name : HKEY_CURRENT_USER\SOFTWARE\Policies\Microsoft\Windows\CurrentVersion\PushNotifications
Property : {}
PSPath : Microsoft.PowerShell.Core\Registry::HKU\S-1-5-19\SOFTWARE\Policies\Microsoft\Windows\CurrentVersion\PushNotifications
PSParentPath : Microsoft.PowerShell.Core\Registry::HKU\S-1-5-19\SOFTWARE\Policies\Microsoft\Windows\CurrentVersion
PSChildName : PushNotifications
PSProvider : Microsoft.PowerShell.Core\Registry
PSIsContainer : True
SubKeyCount : 0
View : Default
Handle : Microsoft.Win32.SafeHandles.SafeRegistryHandle
ValueCount : 0
Name : HKEY_USERS\S-1-5-19\SOFTWARE\Policies\Microsoft\Windows\CurrentVersion\PushNotifications
Property : {}
PSPath : Microsoft.PowerShell.Core\Registry::HKU\S-1-5-20\SOFTWARE\Policies\Microsoft\Windows\CurrentVersion\PushNotifications
PSParentPath : Microsoft.PowerShell.Core\Registry::HKU\S-1-5-20\SOFTWARE\Policies\Microsoft\Windows\CurrentVersion
PSChildName : PushNotifications
PSProvider : Microsoft.PowerShell.Core\Registry
PSIsContainer : True
SubKeyCount : 0
View : Default
Handle : Microsoft.Win32.SafeHandles.SafeRegistryHandle
ValueCount : 0
Name : HKEY_USERS\S-1-5-20\SOFTWARE\Policies\Microsoft\Windows\CurrentVersion\PushNotifications
Disabling People icon on Taskbar
Disabling Cortana
Property : {}
PSPath : Microsoft.PowerShell.Core\Registry::HKU\S-1-5-18\SOFTWARE\Microsoft\InputPersonalization
PSParentPath : Microsoft.PowerShell.Core\Registry::HKU\S-1-5-18\SOFTWARE\Microsoft
PSChildName : InputPersonalization
PSProvider : Microsoft.PowerShell.Core\Registry
PSIsContainer : True
SubKeyCount : 0
View : Default
Handle : Microsoft.Win32.SafeHandles.SafeRegistryHandle
ValueCount : 0
Name : HKEY_USERS\S-1-5-18\SOFTWARE\Microsoft\InputPersonalization
Property : {}
PSPath : Microsoft.PowerShell.Core\Registry::HKU\S-1-5-18\SOFTWARE\Microsoft\InputPersonalization\TrainedDataStore
PSParentPath : Microsoft.PowerShell.Core\Registry::HKU\S-1-5-18\SOFTWARE\Microsoft\InputPersonalization
PSChildName : TrainedDataStore
PSProvider : Microsoft.PowerShell.Core\Registry
PSIsContainer : True
SubKeyCount : 0
View : Default
Handle : Microsoft.Win32.SafeHandles.SafeRegistryHandle
ValueCount : 0
Name : HKEY_USERS\S-1-5-18\SOFTWARE\Microsoft\InputPersonalization\TrainedDataStore
Removing 3D Objects from explorer ‘My Computer’ submenu
Disabling scheduled tasks
Actions : {MSFT_TaskExecAction}
Author : Microsoft
Date :
Description : XblGameSave Standby Task
Documentation :
Principal : MSFT_TaskPrincipal2
SecurityDescriptor :
Settings : MSFT_TaskSettings3
Source :
State : Disabled
TaskName : XblGameSaveTask
TaskPath : \Microsoft\XblGameSave\
Triggers : {MSFT_TaskIdleTrigger}
URI : \Microsoft\XblGameSave\XblGameSaveTask
Version :
PSComputerName :
Actions : {MSFT_TaskExecAction}
Author : Microsoft Corporation
Date :
Description : If the user has consented to participate in the Windows Customer Experience Improvement Program, this job collects and sends usage data
to Microsoft.
Documentation :
Principal : MSFT_TaskPrincipal2
SecurityDescriptor : D:(A;OICI;FA;;;BA)(A;OICI;FA;;;SY)(A;OICI;GRGX;;;AU)
Settings : MSFT_TaskSettings3
Source : Windows Customer Experience Improvement Program
State : Disabled
TaskName : Consolidator
TaskPath : \Microsoft\Windows\Customer Experience Improvement Program\
Triggers : {MSFT_TaskTimeTrigger}
URI : \Microsoft\Windows\Customer Experience Improvement Program\Consolidator
Version : 1.0
PSComputerName :
Actions : {MSFT_TaskComHandlerAction}
Author : Microsoft Corporation
Date :
Description : The USB CEIP (Customer Experience Improvement Program) task collects Universal Serial Bus related statistics and information about your
machine and sends it to the Windows Device Connectivity engineering group at Microsoft. The information received is used to help
improve the reliability, stability, and overall functionality of USB in Windows. If the user has not consented to participate in
Windows CEIP, this task does not do anything.
Documentation :
Principal : MSFT_TaskPrincipal2
SecurityDescriptor : D:(A;OICI;FA;;;BA)(A;OICI;FA;;;SY)(A;OICI;GRGX;;;AU)(A;OICI;SD;;;S-1-5-87-1060603329-121822201-3452730971-4292368946-61207722)(A;;FRFX;;
;LS)
Settings : MSFT_TaskSettings3
Source : Microsoft Corporation
State : Disabled
TaskName : UsbCeip
TaskPath : \Microsoft\Windows\Customer Experience Improvement Program\
Triggers :
URI : \Microsoft\Windows\Customer Experience Improvement Program\UsbCeip
Version : 1.0
PSComputerName :
Actions : {MSFT_TaskExecAction}
Author : Microsoft Windows Feedback
Date :
Description : Update SIUF strings
Documentation :
Principal : MSFT_TaskPrincipal2
SecurityDescriptor :
Settings : MSFT_TaskSettings3
Source : System Initiated User Feedback
State : Disabled
TaskName : DmClient
TaskPath : \Microsoft\Windows\Feedback\Siuf\
Triggers :
URI : \Microsoft\Windows\Feedback\Siuf\DmClient
Version :
PSComputerName :
Actions : {MSFT_TaskExecAction}
Author : Microsoft Windows Feedback
Date :
Description : Update SIUF strings
Documentation :
Principal : MSFT_TaskPrincipal2
SecurityDescriptor :
Settings : MSFT_TaskSettings3
Source : System Initiated User Feedback
State : Disabled
TaskName : DmClientOnScenarioDownload
TaskPath : \Microsoft\Windows\Feedback\Siuf\
Triggers : {MSFT_TaskTrigger}
URI : \Microsoft\Windows\Feedback\Siuf\DmClientOnScenarioDownload
Version :
PSComputerName :
Removing Windows 11 Customisations
PS>TerminatingError(Remove-AppxPackage): “Removal failed. Please contact your software vendor.
Deployment Remove operation with target volume C: on Package Microsoft.XboxGameCallableUI_1000.19041.1023.0_neutral_neutral_cw5n1h2txyewy from: failed with error 0x80070032. See http://go.microsoft.com/fwlink/?LinkId=235160 for help diagnosing app deployment issues.”
Removed Microsoft.XboxGameCallableUI
PS>TerminatingError(Remove-AppxPackage): “Removal failed. Please contact your software vendor.
Deployment Remove operation with target volume C: on Package Microsoft.Windows.ParentalControls_1000.19041.1023.0_neutral_neutral_cw5n1h2txyewy from: failed with error 0x80070032. See http://go.microsoft.com/fwlink/?LinkId=235160 for help diagnosing app deployment issues.”
Removed Microsoft.Windows.ParentalControls
Processing ACL of:
Reading the SD from failed with: The system cannot find the file specified.
SetACL finished with error(s):
SetACL error message: The call to GetNamedSecurityInfo () failed
Operating system error message: The system cannot find the file specified.
Processing ACL of:
Reading the SD from failed with: The system cannot find the file specified.
SetACL finished with error(s):
SetACL error message: The call to GetNamedSecurityInfo () failed
Operating system error message: The system cannot find the file specified.
Property : {}
PSPath : Microsoft.PowerShell.Core\Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Communications
PSParentPath : Microsoft.PowerShell.Core\Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion
PSChildName : Communications
PSDrive : HKLM
PSProvider : Microsoft.PowerShell.Core\Registry
PSIsContainer : True
SubKeyCount : 0
View : Default
Handle : Microsoft.Win32.SafeHandles.SafeRegistryHandle
ValueCount : 0
Name : HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Communications
Property : {}
PSPath : Microsoft.PowerShell.Core\Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Windows Chat
PSParentPath : Microsoft.PowerShell.Core\Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows
PSChildName : Windows Chat
PSDrive : HKLM
PSProvider : Microsoft.PowerShell.Core\Registry
PSIsContainer : True
SubKeyCount : 0
View : Default
Handle : Microsoft.Win32.SafeHandles.SafeRegistryHandle
ValueCount : 0
Name : HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Windows Chat
Removed Teams Chat
Removing Windows Backup
Removed
Clearing Start Menu
Windows 10 Detected
Removing Current Layout
Creating Default Layout
GamePresenceWriter.exe exists
Processing ACL of:
SetACL finished successfully.
Processing ACL of:
SetACL finished successfully.
SettingsPageVisibility : hide:gaming-gamebar;gaming-gamedvr;gaming-broadcasting;gaming-gamemode;gaming-xboxnetworking
PSPath : Microsoft.PowerShell.Core\Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer
PSParentPath : Microsoft.PowerShell.Core\Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies
PSChildName : Explorer
PSDrive : HKLM
PSProvider : Microsoft.PowerShell.Core\Registry
Checking 32-bit System Registry
32-bit check complete
Checking 64-bit System registry
64-bit checks complete
Checking 32-bit User Registry
32-bit check complete
Checking 64-bit Use registry
Detecting Manufacturer
Lenovo detected
Stopping Process SmartAppearanceSVC.exe
Process SmartAppearanceSVC.exe Stopped
Stopping Process UDClientService.exe
Process UDClientService.exe Stopped
Stopping Process ModuleCoreService.exe
Process ModuleCoreService.exe Stopped
Stopping Process ProtectedModuleHost.exe
Process ProtectedModuleHost.exe Stopped
Stopping Process *lenovo*
Process *lenovo* Stopped
Stopping Process FaceBeautify.exe
Process FaceBeautify.exe Stopped
Stopping Process McCSPServiceHost.exe
Process McCSPServiceHost.exe Stopped
Stopping Process mcapexe.exe
Process mcapexe.exe Stopped
Stopping Process MfeAVSvc.exe
Process MfeAVSvc.exe Stopped
Stopping Process mcshield.exe
Process mcshield.exe Stopped
Stopping Process Ammbkproc.exe
Process Ammbkproc.exe Stopped
Stopping Process AIMeetingManager.exe
Process AIMeetingManager.exe Stopped
Stopping Process DADUpdater.exe
Process DADUpdater.exe Stopped
Stopping Process CommercialVantage.exe
Process CommercialVantage.exe Stopped
cmd /c “C:\Program Files (x86)\Lenovo\VantageService\3.13.14.0\Uninstall.exe” /SILENT
ImController.InfInstaller.exe exists
cmd /c c:\windows\system32\ImController.InfInstaller.exe -uninstall
UNINSTALL START
Version is 3.5.1.4
Stopping process named LenovoWelcome.exe
Info: Invoking & C:\WINDOWS\System32\taskkill.exe /t /f /im LenovoWelcome.exe
ERROR: The process “LenovoWelcome.exe” not found.
Stopping process named LenovoWelcomeTask.exe
Info: Invoking & C:\WINDOWS\System32\taskkill.exe /t /f /im LenovoWelcomeTask.exe
ERROR: The process “LenovoWelcomeTask.exe” not found.
Delete the temp folder…
Delete the LenovoWelcome ProgramData folder…
Unable to find shortcut C:\Users\TP\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Lenovo Welcome.lnk
Unable to find shortcut C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Lenovo Welcome.lnk
True
True
True
True
True
Delete the registry HKCU…
Deleted the registry HKCU… HKU:\S-1-5-21-3321954677-513870285-2201277635-1001\Software\Lenovo\LenovoFirstRunExperience
Start to Unregister Uninstall list
ERROR: The system was unable to find the specified registry key or value.
Unregister Uninstall list
Delete the registry HKLM…
Deleted the registry HKLM… HKLM:\SOFTWARE\Wow6432Node\Lenovo\LenovoWelcome
UNINSTALL COMPLETE
All applications and associated Lenovo components have been uninstalled.
Detecting McAfee
McAfee detected
Downloading McAfee Removal Tool
Removing McAfee
McAfee Removal Tool has been run
Downloading McAfee Removal Tool
Directory: C:\ProgramData\Debloat
Mode LastWriteTime Length Name
—- ————- —— —-
d—– 4/9/2024 1:12 PM mcnew
Removing McAfee
McAfee Removal Tool has been run
Attempting to uninstall: [McAfee LiveSafe]…
PS>TerminatingError(Start-Process): “This command cannot be run due to the error: The system cannot find the file specified.”
WARNING: Failed to uninstall: []
Completed
**********************
Windows PowerShell transcript end
End time: 20240409131254
**********************
Hi,
Glad it’s mostly working! Are you running during OOBE or on already established machines?
Would it be possible to get the uninstall string for that version of M365 apps?
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\O365HomePremRetail – en-us
“DisplayName”=”Microsoft 365 – en-us”
“UninstallString”=”\”C:\\Program Files\\Common Files\\Microsoft Shared\\ClickToRun\\OfficeClickToRun.exe\” scenario=install scenariosubtype=ARP sourcetype=None productstoremove=O365HomePremRetail.16_en-us_x-none culture=en-us version.16=16.0″
I changed a snip of your script to have “version.16=16.0” added and it worked! Thank you very much! Im very pleased 😀
write-host “Removing Office Home App”
$locale = Get-WinSystemLocale | Select-Object -expandproperty Name
$AllLanguages = $locale
$ClickToRunPath = “C:\Program Files\Common Files\Microsoft Shared\ClickToRun\OfficeClickToRun.exe”
foreach($Language in $AllLanguages){
Start-Process $ClickToRunPath -ArgumentList “scenario=install scenariosubtype=ARP sourcetype=None productstoremove=O365HomePremRetail.16_$($Language)_x-none culture=$($Language) version.16=16.0 DisplayLevel=False” -Wait
Start-Sleep -Seconds 5
}
write-host “Removed Office Home Apps :-D”
Thank you, I’ve updated it now to match
Im now on a Lenovo T14 Gen4 with the supplied “nordic” image, meaning I can choose the language in OOBE – I have choosen english.
In this situation only the english Office and OneNote was uninstalled.
I checked your script and run “Get-WinSystemLocale | Select-Object -expandproperty Name” it only returned english.
Can you see if Get-InstalledLanguage gives more languages?
O365HomePremRetail – da-dk
“C:\Program Files\Common Files\Microsoft Shared\ClickToRun\OfficeClickToRun.exe” scenario=install scenariosubtype=ARP sourcetype=None productstoremove=O365HomePremRetail.16_da-dk_x-none culture=da-dk version.16=16.0
O365HomePremRetail – fi-fi
“C:\Program Files\Common Files\Microsoft Shared\ClickToRun\OfficeClickToRun.exe” scenario=install scenariosubtype=ARP sourcetype=None productstoremove=O365HomePremRetail.16_fi-fi_x-none culture=fi-fi version.16=16.0
O365HomePremRetail – nb-no
“C:\Program Files\Common Files\Microsoft Shared\ClickToRun\OfficeClickToRun.exe” scenario=install scenariosubtype=ARP sourcetype=None productstoremove=O365HomePremRetail.16_nb-no_x-none culture=nb-no version.16=16.0
O365HomePremRetail – sv-se
“C:\Program Files\Common Files\Microsoft Shared\ClickToRun\OfficeClickToRun.exe” scenario=install scenariosubtype=ARP sourcetype=None productstoremove=O365HomePremRetail.16_sv-se_x-none culture=sv-se version.16=16.0
OneNoteFreeRetail – da-dk
“C:\Program Files\Common Files\Microsoft Shared\ClickToRun\OfficeClickToRun.exe” scenario=install scenariosubtype=ARP sourcetype=None productstoremove=OneNoteFreeRetail.16_da-dk_x-none culture=da-dk version.16=16.0
OneNoteFreeRetail – fi-fi
“C:\Program Files\Common Files\Microsoft Shared\ClickToRun\OfficeClickToRun.exe” scenario=install scenariosubtype=ARP sourcetype=None productstoremove=OneNoteFreeRetail.16_fi-fi_x-none culture=fi-fi version.16=16.0
OneNoteFreeRetail – nb-no
“C:\Program Files\Common Files\Microsoft Shared\ClickToRun\OfficeClickToRun.exe” scenario=install scenariosubtype=ARP sourcetype=None productstoremove=OneNoteFreeRetail.16_nb-no_x-none culture=nb-no version.16=16.0
OneNoteFreeRetail – sv-se
“C:\Program Files\Common Files\Microsoft Shared\ClickToRun\OfficeClickToRun.exe” scenario=install scenariosubtype=ARP sourcetype=None productstoremove=OneNoteFreeRetail.16_sv-se_x-none culture=sv-se version.16=16.0
The command returned:
Language Language Packs Language Features
——– ————– —————–
da-DK LpCab BasicTyping, Handwriting, TextToSpeech, OCR
en-US LpCab BasicTyping, Handwriting, Speech, TextToSpeech, OCR
fi-FI LpCab BasicTyping, Handwriting, TextToSpeech, OCR
nb-NO LpCab BasicTyping, Handwriting, TextToSpeech, OCR
sv-SE LpCab BasicTyping, Handwriting, TextToSpeech, OCR
I’ve just added a new version which should fix it for office uninstall
I have downloaded the new script, it uninstalled all 5 Office apps and 2 OneNote (en and da)
I added some debug write-host and I can see that Office Click to Run was initialised but did not complete correct and are also still running in taskmgr.
Have you tried on more than 1 machine, it’s just calling the same uninstall command for each one
I have reset the same machine and tried it again, same error as before. Seams like the ClickToRun are hanging.
They’re probably waiting for the previous one to complete. The only option would be to add a wait into the script, but that might cause timeouts in Autopilot
Yes, that is also my perception of the situation
As mentioned earlier, I added a write host after the individual steps. At the same time I changed your wait from 5 to 30 seconds. But it did not change the situation. Also after the error, I cant initialize a manual uninstall from Add, Remove Programs. I need to reboot and then Im able to uninstall manually. Seams to be a problem with ClickRun, any idears?
Looks like its hanging on fi-FI every time.
It might be worth running that manually to see why it’s stalling
I did and manually it works with no errors.
Not sure what else I can suggest for this one, you might have to test with various wait commands to see if you can get it to remove
Just a small update. I changed the script to do the install static, with DisplayLevel True, pr langauge I have in my image:
1 da-DK
2 en-US
3 fi-FI
4 nb-NO
5 sv-SE
I then tried to reorder:
1 fi-FI
2 en-US
3 da-DK
4 nb-NO
5 sv-SE
Now its 4 nb-NO that is hanging. I have tried to close running Clickandrun processes ind taskmgr, restart Clickandrun service. But I cant get it to run again manually unless I reboot.
Maybe a solution could be to find what processes and services to restart or close in between each uninstall?
Have you confirmed that uninstalling serveral langagues are working on other PC’s (Brand new models)?
Thank you for all your great inputs and fantasic work 🙂
I don’t have hardware available to test multi-language and multi-model unfortunately. If you find a fix, I am happy to add it to the script though
Do you know of a way to start a powershel script that reboots underway, and continues at the next point after reboot? 🙂
I would be very careful doing that as it could cause other issues during Autopilot. You’re better off finding what’s locked and stopping the process
Hello Andrew,
I am trying to remove bloatware (including co-pilot) from a Dell Inspiron 16 5630 WIN 11 Pro laptop. Does your script perform the removal for “All Users”? I have removed it logged in as “Administrator” but is still present when another user logs on.
Thank you!
Hi Kevin,
It will remove most things for all users, but if it’s a start menu stub like Spotify etc. it will only apply for any new users on the device
Hello Andrew, in testing to implement your De-Bloat script with our InTune tenant the script is uninstalling “Microsoft InTune Managment Extension” as a final step according the log on our OOBE Lenovo laptops. Specifically the e16’s I am currently testing on.
This breaks communication with the tenat and stops the applications from installing.
I have reinstalled the management extension manually and its is removed again by the script, because it never checks in with InTune that the script has already run on this device.
Its my understanding that the script whitelists Microsoft InTune Managment Extension, so I am at a loss on what could be happening here.
Hi Chris, can you email me the logs please (andrew.taylor@) and I’ll see if I can work out what’s happening
Thanks for the script .
The application was not detected after installation completed successfully (0x87D1041C)
The above error comes up with the detection rule can you please help .
Can you check if this exists?
C:\ProgramData\Debloat\debloat.log
I find deploying as a platform script works better than Win32 app as well
Hi Andrew, First off, thank you, this script really helps clean up new machines. It appears after some updates, etc. some bloatware returns. I would like to run the script again but also target current users, what changes would need to be made for this to clean-up profiles already on the machines?
Hi,
It should also work fine on existing machines as I have added keys which loop through all user registry keys to make the changes. I also added logic so it won’t attempt to remove apps which don’t exist to cut down on errors
Hey Andrew, ty for the script. I had a more detailed post but lost it when hitting post so sorry for truncated do to time.
Are there any order of operation or Intune settings I’m missing as it seems to be hit or miss on removing HP bloat from a new year model HP.
Program
Install command
powershell -executionpolicy bypass -file debloat-intune-script.ps1
Uninstall command
cmd.exe /c
Installation time required (mins)
15
Allow available uninstall
No
Install behavior
System
Device restart behavior
App install may force a device restart
Return codes
0 Success
1707 Success
3010 Soft reboot
1641 Hard reboot
1618 Retry
Requirements
Operating system architecture
x86,x64
Minimum operating system
Windows 10 1607
Disk space required (MB)
No Disk space required (MB)
Physical memory required (MB)
No Physical memory required (MB)
Minimum number of logical processors required
No Minimum number of logical processors required
Minimum CPU speed required (MHz)
No Minimum CPU speed required (MHz)
Additional requirement rules
No Additional requirement rules
Detection rules
Rules format
Manually configure detection rules
Detection rules
File C:\ProgramData\Debloat\
Debloat.log
Whitelisting – am I doing it right? Seems that some apps I have listed with app* or *app* are still getting removed. Here is a link to my forked version so that I can keep my own whitelist running. https://raw.githubusercontent.com/Axxys-Technologies-Inc/IntuneTools2/main/De-Bloat/RemoveBloat.ps1 . I am still testing and creating the list but seems that things I would expect “*ConnectWise*” to cover can still be removed. These are all HPs and surefaces. No dells.
##Apps to ignore – NOTE: Chrome has an unusual uninstall so sort on it’s own
$whitelistapps = @(
“Microsoft Update Health Tools”
“Microsoft Intune Management Extension”
“Microsoft Edge”
“Microsoft Edge Update”
“Microsoft Edge WebView2 Runtime”
“Google Chrome”
“Microsoft Teams”
“Teams Machine-Wide Installer”
“Microsoft OneDrive”
“@C:\WINDOWS\System32\mstsc.exe,-4000”
“Halcyon AR”
“WatchGuard Mobile VPN with SSL client 12.10”
“Sophos Management Communications System”
“ScreenConnect Client (a91a12555ca17441)”
“CYRISMA Sensor version 2.5”
“LogMeIn Client”
“Sophos Health”
“ConnectWise Automate Remote Agent”
“Adobe Refresh Manager”
“Adobe Acrobat 2020”
“*Adobe Acrobat*”
“LogMeIn”
“Automate Control Center”
“*MySQL Connector*”
“Microsoft Visual C++*”
“ConnectWise Automate Control Center”
“*ConnectWise*”
“*Automate*”
“*Zoom*”
“*Chrome*”
Hi,
You might be better using the $customwhitelist parameter. If not, you need to make sure you whitelist in the HP section as well.
In terms of order, it does AppXApps, then manufacturer bloat and then Win32 apps.
If you are deploying as an app, the Win32 removal won’t happen anyway as it looks for the existence of a reg key created during the first win32 deployment. Running as a script runs during the “Preparing Apps” phase so is a bit more powerful
Thanks for getting back to me. Can you ELI5? I stared with with that but I see results for $customwhitelist on multiple lines and could no figure out where to put my list to make it work. I added the apps to the section at line 296 but that did not work. Adding them down at 1823 whitelistapps started to give me results but was not 100%
Each section has it’s own whitelist. Your best option is probably to create an array within the script containing your apps to avoid having to amend each line.
If you are deploying as an app, you can remove the final section as well as that won’t run anyway
I tried the script myself, and I was also unable to uninstall McAfee
Thank you
Hi and thank you for the fast response.
Apparently it was Intune not having synced, but I have one more for your list: Lenovo Smart Noise Cancellation.
About McAfee now: https://imgur.com/a/GsGMr6t
Thank you in advance
Can you get the AppXPackage name for the Lenovo one?
For McAfee, I’ve heard the ESET removal tool will remove it, if that works, I can include it in the script. I don’t have any devices with it installed so haven’t been able to test myself though
ESET av remover worked even though it had a lot of prompts and stuff, but I think it can probably be done silently?
And about the Lenovo one, I am not able to do it now, but probably someone else can do it before me today.
Thank you for everything so far
And a stupid question, what is the use of the locale? If for example I have a program Microsoft.Kamera, then the German will be used for removal or the default English will uninstall it?
I’ll add ESET with the Lenovo.
The locale is for changing permissions on files and registry keys as the group names are language specific. Most things work in English
Btw, should I remove the code to install your McAfee zip since it doesn’t work?
Thank you
Yes, you can remove that part. It only seems to work for certain versions of McAfee
Hi Andrew again,
I run this command: Get-AppxPackage | % {if (!($_.IsFramework -or $_.PublisherId -eq “cw5n1h2txyewy”)) {$_}} | select PackageFullName
And among the many results, one of them was this: ElevocTechnologyCo.Ltd.SmartMicrophoneSettings_1.1.49.0_x64__ttaqwwhyt5s6t which may be the Smart Noise Cancellation thing. Thank you
I hope I helped you and @Dorean with this
Hi Andrew, I finally got back on my machine after being away, and after running the command that @John shared, I found this:
4505Fortemedia.FMAPOControl2_2.1.37.0_x64__4pejv7q2gmsnr
After further testing, I found out both John’s and mine are Lenovo Smart Noise Cancellation applications, but they differ to that mine was developed by Fortemedia (version and name matches to the app in Settings), and John’s by elevoc. It is so weird…
I’ve added both onto version 4.2.5 which is online now
Hi Andrew again,
I tried to remove McAfee locally from a machine and I got this error: https://imgur.com/a/VNFTERn
Could this be related to the script failing? So far I have seen in in two machines. I will come back once I find the location on the particular computers, but I do find it interesting.
Kind regards
It probably won’t be helping, if you can find any uninstall commands, I can include them in the script
Update: The latest version of MCPR https://www.mcafee.com/support/?articleId=TS101331&page=shell&shell=article-view was able to remove my McAfee. The tool told me that the uninstallation failed, but McAfee was actually gone from the computer. Maybe a newer version would work better?
Kind regards
Thank you, I’ll get that one packaged into a new version. Should be online early next week, I’ll let you know
Hi Andrew, how are you?
I tried the new version with MCPR, and it was again unable to find McAfee…
Detecting McAfee
McAfee detected
Downloading McAfee Removal Tool
Directory: C:\ProgramData\Debloat
Mode LastWriteTime Length Name
—- ————- —— —-
d—– 3/19/2024 4:26 PM mcnew
Removing McAfee
McAfee Removal Tool has been run
Attempting to uninstall: [McAfee® Total Protection]…
PS>TerminatingError(Start-Process): “This command cannot be run due to the error: The system cannot find the file specified.”
WARNING: Failed to uninstall: []
Completed
Hi,
That’s the best I can do with McAfee I’m afraid unless you have a fix?
Yep, I understand. I will look at this, but at that point may be better to ask users to uninstall it.
I will let you know
Thank you
Hi Andrew again,
I tried locally on a different machine, and the old (2 year one) zip managed to remove McAfee via your script.
I will conduct some thorough testing on some Intune-joined (and some AutoPilot) devices and let you know.
Hi Andrew again,
It run on the test device and even though it said it succeeded with most stuff, I still see Lenovo apps and McAfee (which failed to uninstall). Funny thing is that Intune says it failed.
Here is the log file:
**********************
Windows PowerShell transcript start
Start time: 20240307085750
Username: WORKGROUP\SYSTEM
RunAs User: WORKGROUP\SYSTEM
Configuration Name:
Machine: DS-LAPT-000199 (Microsoft Windows NT 10.0.22631.0)
Host Application: C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -NoProfile -executionPolicy bypass -file C:\Program Files (x86)\Microsoft Intune Management Extension\Policies\Scripts\d1f2b438-9262-4a67-8f1d-d50e4ac8208d_f4c9eabe-1a35-47eb-b7ac-fab36e7e23cd.ps1
Process ID: 27060
PSVersion: 5.1.22621.2506
PSEdition: Desktop
PSCompatibleVersions: 1.0, 2.0, 3.0, 4.0, 5.0, 5.1.22621.2506
BuildVersion: 10.0.22621.2506
CLRVersion: 4.0.30319.42000
WSManStackVersion: 3.0
PSRemotingProtocolVersion: 2.3
SerializationVersion: 1.1.0.1
**********************
Transcript started, output file is C:\ProgramData\Debloat\Debloat.log
Microsoft.549981C3F5F10 not found.
Provisioned package for Microsoft.549981C3F5F10 not found.
Microsoft.BingNews not found.
Provisioned package for Microsoft.BingNews not found.
Microsoft.GetHelp not found.
Provisioned package for Microsoft.GetHelp not found.
Microsoft.Getstarted not found.
Provisioned package for Microsoft.Getstarted not found.
Microsoft.Messaging not found.
Provisioned package for Microsoft.Messaging not found.
Microsoft.Microsoft3DViewer not found.
Provisioned package for Microsoft.Microsoft3DViewer not found.
Microsoft.MicrosoftSolitaireCollection not found.
Provisioned package for Microsoft.MicrosoftSolitaireCollection not found.
Microsoft.NetworkSpeedTest not found.
Provisioned package for Microsoft.NetworkSpeedTest not found.
Microsoft.MixedReality.Portal not found.
Provisioned package for Microsoft.MixedReality.Portal not found.
Microsoft.News not found.
Provisioned package for Microsoft.News not found.
Microsoft.Office.Lens not found.
Provisioned package for Microsoft.Office.Lens not found.
Microsoft.Office.Sway not found.
Provisioned package for Microsoft.Office.Sway not found.
Microsoft.OneConnect not found.
Provisioned package for Microsoft.OneConnect not found.
Microsoft.People not found.
Provisioned package for Microsoft.People not found.
Microsoft.Print3D not found.
Provisioned package for Microsoft.Print3D not found.
Microsoft.RemoteDesktop not found.
Provisioned package for Microsoft.RemoteDesktop not found.
Microsoft.SkypeApp not found.
Provisioned package for Microsoft.SkypeApp not found.
Microsoft.StorePurchaseApp not found.
Provisioned package for Microsoft.StorePurchaseApp not found.
Microsoft.Office.Todo.List not found.
Provisioned package for Microsoft.Office.Todo.List not found.
Microsoft.Whiteboard not found.
Provisioned package for Microsoft.Whiteboard not found.
Microsoft.WindowsAlarms not found.
Provisioned package for Microsoft.WindowsAlarms not found.
microsoft.windowscommunicationsapps not found.
Provisioned package for microsoft.windowscommunicationsapps not found.
Microsoft.WindowsFeedbackHub not found.
Provisioned package for Microsoft.WindowsFeedbackHub not found.
Microsoft.WindowsMaps not found.
Provisioned package for Microsoft.WindowsMaps not found.
Microsoft.WindowsSoundRecorder not found.
Provisioned package for Microsoft.WindowsSoundRecorder not found.
Microsoft.Xbox.TCUI not found.
Provisioned package for Microsoft.Xbox.TCUI not found.
Microsoft.XboxApp not found.
Provisioned package for Microsoft.XboxApp not found.
Microsoft.XboxGameOverlay not found.
Provisioned package for Microsoft.XboxGameOverlay not found.
Microsoft.XboxIdentityProvider not found.
Provisioned package for Microsoft.XboxIdentityProvider not found.
Microsoft.XboxSpeechToTextOverlay not found.
Provisioned package for Microsoft.XboxSpeechToTextOverlay not found.
Microsoft.ZuneMusic not found.
Provisioned package for Microsoft.ZuneMusic not found.
Microsoft.ZuneVideo not found.
Provisioned package for Microsoft.ZuneVideo not found.
MicrosoftTeams not found.
Provisioned package for MicrosoftTeams not found.
Microsoft.YourPhone not found.
Provisioned package for Microsoft.YourPhone not found.
Microsoft.XboxGamingOverlay_5.721.10202.0_neutral_~_8wekyb3d8bbwe not found.
Provisioned package for Microsoft.XboxGamingOverlay_5.721.10202.0_neutral_~_8wekyb3d8bbwe not found.
Microsoft.GamingApp not found.
Provisioned package for Microsoft.GamingApp not found.
Microsoft.Todos not found.
Provisioned package for Microsoft.Todos not found.
Microsoft.PowerAutomateDesktop not found.
Provisioned package for Microsoft.PowerAutomateDesktop not found.
SpotifyAB.SpotifyMusic not found.
Provisioned package for SpotifyAB.SpotifyMusic not found.
Disney.37853FC22B2CE not found.
Provisioned package for Disney.37853FC22B2CE not found.
*EclipseManager* not found.
Provisioned package for *EclipseManager* not found.
*ActiproSoftwareLLC* not found.
Provisioned package for *ActiproSoftwareLLC* not found.
*AdobeSystemsIncorporated.AdobePhotoshopExpress* not found.
Provisioned package for *AdobeSystemsIncorporated.AdobePhotoshopExpress* not found.
*Duolingo-LearnLanguagesforFree* not found.
Provisioned package for *Duolingo-LearnLanguagesforFree* not found.
*PandoraMediaInc* not found.
Provisioned package for *PandoraMediaInc* not found.
*CandyCrush* not found.
Provisioned package for *CandyCrush* not found.
*BubbleWitch3Saga* not found.
Provisioned package for *BubbleWitch3Saga* not found.
*Wunderlist* not found.
Provisioned package for *Wunderlist* not found.
*Flipboard* not found.
Provisioned package for *Flipboard* not found.
*Twitter* not found.
Provisioned package for *Twitter* not found.
*Facebook* not found.
Provisioned package for *Facebook* not found.
*Minecraft* not found.
Provisioned package for *Minecraft* not found.
*Royal Revolt* not found.
Provisioned package for *Royal Revolt* not found.
*Sway* not found.
Provisioned package for *Sway* not found.
*Speed Test* not found.
Provisioned package for *Speed Test* not found.
*Dolby* not found.
Provisioned package for *Dolby* not found.
*Disney* not found.
Provisioned package for *Disney* not found.
clipchamp.clipchamp not found.
Provisioned package for clipchamp.clipchamp not found.
*gaming* not found.
Provisioned package for *gaming* not found.
MicrosoftCorporationII.MicrosoftFamily not found.
Provisioned package for MicrosoftCorporationII.MicrosoftFamily not found.
C27EB4BA.DropboxOEM* not found.
Provisioned package for C27EB4BA.DropboxOEM* not found.
*DevHome* not found.
Provisioned package for *DevHome* not found.
Removing HKCR:\Extensions\ContractId\Windows.BackgroundTasks\PackageId\46928bounde.EclipseManager_2.2.4.51_neutral__a5h4egax66k6y from registry
Removing HKCR:\Extensions\ContractId\Windows.BackgroundTasks\PackageId\ActiproSoftwareLLC.562882FEEB491_2.6.18.18_neutral__24pqs290vpjk0 from registry
Removing HKCR:\Extensions\ContractId\Windows.BackgroundTasks\PackageId\Microsoft.PPIProjection_10.0.15063.0_neutral_neutral_cw5n1h2txyewy from registry
Removing HKCR:\Extensions\ContractId\Windows.BackgroundTasks\PackageId\Microsoft.XboxGameCallableUI_1000.15063.0.0_neutral_neutral_cw5n1h2txyewy from registry
Removing HKCR:\Extensions\ContractId\Windows.BackgroundTasks\PackageId\Microsoft.XboxGameCallableUI_1000.16299.15.0_neutral_neutral_cw5n1h2txyewy from registry
Removing HKCR:\Extensions\ContractId\Windows.File\PackageId\ActiproSoftwareLLC.562882FEEB491_2.6.18.18_neutral__24pqs290vpjk0 from registry
Removing HKCR:\Extensions\ContractId\Windows.Launch\PackageId\46928bounde.EclipseManager_2.2.4.51_neutral__a5h4egax66k6y from registry
Removing HKCR:\Extensions\ContractId\Windows.Launch\PackageId\ActiproSoftwareLLC.562882FEEB491_2.6.18.18_neutral__24pqs290vpjk0 from registry
Removing HKCR:\Extensions\ContractId\Windows.Launch\PackageId\Microsoft.PPIProjection_10.0.15063.0_neutral_neutral_cw5n1h2txyewy from registry
Removing HKCR:\Extensions\ContractId\Windows.Launch\PackageId\Microsoft.XboxGameCallableUI_1000.15063.0.0_neutral_neutral_cw5n1h2txyewy from registry
Removing HKCR:\Extensions\ContractId\Windows.Launch\PackageId\Microsoft.XboxGameCallableUI_1000.16299.15.0_neutral_neutral_cw5n1h2txyewy from registry
Removing HKCR:\Extensions\ContractId\Windows.PreInstalledConfigTask\PackageId\Microsoft.MicrosoftOfficeHub_17.7909.7600.0_x64__8wekyb3d8bbwe from registry
Removing HKCR:\Extensions\ContractId\Windows.Protocol\PackageId\ActiproSoftwareLLC.562882FEEB491_2.6.18.18_neutral__24pqs290vpjk0 from registry
Removing HKCR:\Extensions\ContractId\Windows.Protocol\PackageId\Microsoft.PPIProjection_10.0.15063.0_neutral_neutral_cw5n1h2txyewy from registry
Removing HKCR:\Extensions\ContractId\Windows.Protocol\PackageId\Microsoft.XboxGameCallableUI_1000.15063.0.0_neutral_neutral_cw5n1h2txyewy from registry
Removing HKCR:\Extensions\ContractId\Windows.Protocol\PackageId\Microsoft.XboxGameCallableUI_1000.16299.15.0_neutral_neutral_cw5n1h2txyewy from registry
Removing HKCR:\Extensions\ContractId\Windows.ShareTarget\PackageId\ActiproSoftwareLLC.562882FEEB491_2.6.18.18_neutral__24pqs290vpjk0 from registry
Disabling Windows Feedback Experience program
Stopping Cortana from being used as part of your Windows Search Function
Disabling Bing Search in Start Menu
Stopping the Windows Feedback Experience program
Adding Registry key to prevent bloatware apps from returning
Setting Mixed Reality Portal value to 0 so that you can uninstall it in Settings
Disabling Wi-Fi Sense
Disabling live tiles
Disabling People icon on Taskbar
Disabling Cortana
Removing 3D Objects from explorer ‘My Computer’ submenu
Disabling scheduled tasks
TaskPath TaskName State
——– ——– —–
\Microsoft\XblGameSave\ XblGameSaveTask Disabled
\Microsoft\Windows\Customer Experience Impr… Consolidator Disabled
\Microsoft\Windows\Customer Experience Impr… UsbCeip Disabled
\Microsoft\Windows\Feedback\Siuf\ DmClient Disabled
\Microsoft\Windows\Feedback\Siuf\ DmClientOnScenarioDownload Disabled
Removing Windows 11 Customisations
PS>TerminatingError(Remove-AppxPackage): “Removal failed. Please contact your software vendor.
Deployment DeStage operation with target volume C: on Package Microsoft.XboxGameCallableUI_1000.22621.1.0_neutral_neutral_cw5n1h2txyewy from: failed with error 0x80070032. See http://go.microsoft.com/fwlink/?LinkId=235160 for help diagnosing app deployment issues.”
Removed Microsoft.XboxGameCallableUI
PS>TerminatingError(Remove-AppxPackage): “Removal failed. Please contact your software vendor.
Deployment DeStage operation with target volume C: on Package Microsoft.Windows.ParentalControls_1000.22621.1.0_neutral_neutral_cw5n1h2txyewy from: failed with error 0x80070032. See http://go.microsoft.com/fwlink/?LinkId=235160 for help diagnosing app deployment issues.”
Removed Microsoft.Windows.ParentalControls
Removed Teams Chat
Clearing Start Menu
Windows 11 Detected
Removing Current Layout
GamePresenceWriter.exe does not exist
SettingsPageVisibility : hide:gaming-gamebar;gaming-gamedvr;gaming-broadcasting;gaming-gamemode;gaming-xboxnetworking
PSPath : Microsoft.PowerShell.Core\Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersi
on\Policies\Explorer
PSParentPath : Microsoft.PowerShell.Core\Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersi
on\Policies
PSChildName : Explorer
PSDrive : HKLM
PSProvider : Microsoft.PowerShell.Core\Registry
Checking 32-bit System Registry
32-bit check complete
Checking 64-bit System registry
64-bit checks complete
Checking 32-bit User Registry
32-bit check complete
Checking 64-bit Use registry
Detecting Manufacturer
Lenovo detected
Stopping Process SmartAppearanceSVC.exe
Process SmartAppearanceSVC.exe Stopped
Stopping Process UDClientService.exe
Process UDClientService.exe Stopped
Stopping Process ModuleCoreService.exe
Process ModuleCoreService.exe Stopped
Stopping Process ProtectedModuleHost.exe
Process ProtectedModuleHost.exe Stopped
Stopping Process *lenovo*
Process *lenovo* Stopped
Stopping Process FaceBeautify.exe
Process FaceBeautify.exe Stopped
Stopping Process McCSPServiceHost.exe
Process McCSPServiceHost.exe Stopped
Stopping Process mcapexe.exe
Process mcapexe.exe Stopped
Stopping Process MfeAVSvc.exe
Process MfeAVSvc.exe Stopped
Stopping Process mcshield.exe
Process mcshield.exe Stopped
Stopping Process Ammbkproc.exe
Process Ammbkproc.exe Stopped
Stopping Process AIMeetingManager.exe
Process AIMeetingManager.exe Stopped
Stopping Process DADUpdater.exe
Process DADUpdater.exe Stopped
Stopping Process CommercialVantage.exe
Process CommercialVantage.exe Stopped
ImController.InfInstaller.exe exists
cmd /c c:\windows\system32\ImController.InfInstaller.exe -uninstall
UNINSTALL START
Version is 3.12.2.2
Stopping process named LenovoNow.exe
Info: Invoking & C:\Windows\System32\taskkill.exe /t /f /im LenovoNow.exe
Stopping process named LenovoNow.Task.exe
Info: Invoking & C:\Windows\System32\taskkill.exe /t /f /im LenovoNow.Task.exe
Delete the temp folder…
Delete the LenovoNow ProgramData folder…
Unable to find shortcut C:\Windows\system32\config\systemprofile\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Lenovo Now.lnk
Unable to find shortcut C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Lenovo Now.lnk
True
True
True
True
True
Delete the registry HKCU…
Deleted the registry HKCU… HKU:\S-1-12-1-3522343992-1248301666-248847759-2367735882\Software\Lenovo\LenovoFirstRunExperience
Start to Unregister Uninstall list
Unregister Uninstall list
Delete the registry HKLM…
Deleted the registry HKLM… HKLM:\SOFTWARE\Wow6432Node\Lenovo\Lenovo Now
Remove catalog
UNINSTALL COMPLETE
All applications and associated Lenovo components have been uninstalled.
Detecting McAfee
McAfee detected
Downloading McAfee Removal Tool
Removing McAfee
McAfee Removal Tool has been run
Attempting to uninstall: [McAfee]…
PS>TerminatingError(Start-Process): “This command cannot be run due to the error: The system cannot find the file specified.”
WARNING: Failed to uninstall: []
Completed
**********************
Windows PowerShell transcript end
End time: 20240307085904
**********************
Once again thank you for an awesome script
Which Lenovo apps are left?
Has it downloaded the McAfee tool to the Debloat folder?
Hi Andrew!
Thanks for a great script. I noticed there are already some mentions about Lenovo Vantage but it seems that it is no longer working. We just installed a couple machines with all of them still having Lenovo Vantage installed.
In winget list Lenovo Commercial Vantage shows with ID: E046963F.LenovoSettingsforEnterprise.
It shows up in C:\Program Files\WindowsApps\ and that package name then has a whole LenovoVantage folder full with stuff. CommercialVantage.exe seems to be the application running on the computer and it is ran from that folder.
And then there is a new bloatware from Lenovo called Lenovo View. ID: E046963F.cameraSettings
This is also in WindowsApps.
Thank you, I’ve just added them into v4.2.4. Hopefully that will remove them both
Yes. Both of them are now gone. Thanks for a lightning fast fix! 🙂
Hi Andrew, and thanks for the script. I am interested in deploying it using the two scripts method but my question is what happens if I want to remove some features from the script such as remove Chrome, and Copilot (basically not uninstall them). Is there a workaround here like editing it and uploading it to a GitHub of mine with the appropriate mentions (whatever you say), or is there a better option?
Thank you
Hi,
There is a whitelist option for some apps, but I would probably create a copy of the removebloat script, change it as required and host it on your own Github,Azure etc.
Then in the deployment script, download your copy instead of the main one
Ok, good, thank you.
Hi again Andrew. I tried the following script (https://pastebin.com/7aDj6W6r) on my machine locally and it worked perfectly, but then I tried it on a (Lenovo) test machine on Intune Scripts and Remediations as a script with name “Name.ps1” and the script running as system and without checking for signature. The script failed and the logs show this (https://pastebin.com/qV78kGCK) exactly below the script. I do not think this is from your side, but I still wanted to ask. Finally, will the two-scripts method work better or they should be equivalent either way?
Thank you
Hi,
The first screenshot doesn’t seem to be working. Is it set to 64-bit?
Either script method will work, the two scripts just means you can update the bloat script without having to replace the one in Intune (which will trigger a re-run)
Hi and thank you for the instant response. The first one doesn’t work because it awaits moderation apparently. 😅
I checked again and I am running on 32bit. Does it make so much of a difference? I will try on 64 and let you know.
Once again, thank you
Try 64-bit, otherwise the reg keys won’t stick
I have this as part of my ESP autopilot required apps deployment and for some reason all our new HP dragonfly’s (win 11 22h2) would get hung up in the apps phase of device ESP. After doing some debugging to narrow which app was hanging, it appears it’s the script (though it works fine on our other HP models). Running it manually at OOBE using Shift+f10 shows the issue– through the script completes fine, it ends with an MSI installer syntax pop-up, as if an MSI command was passed that was improperly formatted. The transcript doesn’t really give any clues as it completes, with the only error being the following:
———
Removing Windows 11 customizations
PS> TerminatingError(Remove-appxpackage): “The request is not supported”
error 0x80070032
Can you send the registry entries for all apps on the new devices? One probably has a bad uninstall command
Let me know where I can send the full uninstall key dump if you need it, but this appears to be what’s failing it. It reaches the app in the transcript and then about ten command windows open up with a blinking cursor along with pop-ups for proper MSI syntax formatting.
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{C2F1EB22-02EB-4B5A-82F5-62C83BEF6626}]
“AuthorizedCDFPrefix”=””
“Comments”=”HP Security Update Service”
“Contact”=”HP”
“DisplayVersion”=”4.4.11.364”
“HelpLink”=hex(2):68,00,74,00,74,00,70,00,73,00,3a,00,2f,00,2f,00,77,00,77,00,\
77,00,2e,00,62,00,72,00,6f,00,6d,00,69,00,75,00,6d,00,2e,00,63,00,6f,00,6d,\
00,00,00
“HelpTelephone”=””
“InstallDate”=”20240313”
“InstallLocation”=””
“InstallSource”=”C:\\ProgramData\\HP\\Security Update Service\\Temp\\G9SIDDE0\\”
“ModifyPath”=hex(2):4d,00,73,00,69,00,45,00,78,00,65,00,63,00,2e,00,65,00,78,\
00,65,00,20,00,2f,00,58,00,7b,00,43,00,32,00,46,00,31,00,45,00,42,00,32,00,\
32,00,2d,00,30,00,32,00,45,00,42,00,2d,00,34,00,42,00,35,00,41,00,2d,00,38,\
00,32,00,46,00,35,00,2d,00,36,00,32,00,43,00,38,00,33,00,42,00,45,00,46,00,\
36,00,36,00,32,00,36,00,7d,00,00,00
“NoModify”=dword:00000001
“Publisher”=”HP Inc.”
“Readme”=””
“Size”=””
“UninstallString”=hex(2):4d,00,73,00,69,00,45,00,78,00,65,00,63,00,2e,00,65,00,\
78,00,65,00,20,00,2f,00,58,00,7b,00,43,00,32,00,46,00,31,00,45,00,42,00,32,\
00,32,00,2d,00,30,00,32,00,45,00,42,00,2d,00,34,00,42,00,35,00,41,00,2d,00,\
38,00,32,00,46,00,35,00,2d,00,36,00,32,00,43,00,38,00,33,00,42,00,45,00,46,\
00,36,00,36,00,32,00,36,00,7d,00,00,00
“URLInfoAbout”=https://www.bromium.com
“URLUpdateInfo”=””
“VersionMajor”=dword:00000004
“VersionMinor”=dword:00000004
“WindowsInstaller”=dword:00000001
“Version”=dword:0404000b
“Language”=dword:00000409
“DisplayName”=”HP Security Update Service”
That’s a very strange uninstall string. Can you see if there is an uninstall.exe for that application on the device? I might have to remove from the loop and manually remove it
It’s hex, translates to MsiExec.exe /X{C2F1EB22-02EB-4B5A-82F5-62C83BEF6626}
The msi code will be different when the app changes, I prefer to find the name of the msi itself where possible
can you add the following:
removing the quick assist and the journal app
ive also added the free office copies to my version
$AllLanguages = “en-us”
$ClickToRunPath = “C:\Program Files\Common Files\Microsoft Shared\ClickToRun\OfficeClickToRun.exe”
foreach($Language in $AllLanguages){
Start-Process $ClickToRunPath -ArgumentList “scenario=install scenariosubtype=ARP sourcetype=None productstoremove=O365HomePremRetail.16_$($Language)_x-none culture=$($Language) DisplayLevel=False” -Wait
Start-Sleep -Seconds 5
}
$ClickToRunPath = “C:\Program Files\Common Files\Microsoft Shared\ClickToRun\OfficeClickToRun.exe”
foreach($Language in $AllLanguages){
Start-Process $ClickToRunPath -ArgumentList “scenario=install scenariosubtype=ARP sourcetype=None productstoremove=OneNoteFreeRetail.16_$($Language)_x-none culture=$($Language) DisplayLevel=False” -Wait
Start-Sleep -Seconds 5
}
as a separate request Lenovo’s also seem to get Smart Note by lenovo and Lenovo Now, not figured those out yet.
Cheers
Do you have the package name for the journal app?
Quick assist is a tricky one as it’s used by some organisations as a free remote assistance app
Will get Office added during OOBE
im running Get-AppxPackage *Journal* | Remove-AppxPackage to remove journal
i have also included FR and ES in my office script above
$AllLanguages = “en-us”,”es-es”,”fr-fr”
I’ll need the full AppXPackage name, if I include that it will delete any store apps with journal in the name
Hi Andrew,
I’m getting the following error with McAfee, any suggestions?
Deleted the registry HKLM… HKLM:\SOFTWARE\Wow6432Node\Lenovo\LenovoWelcome
Remove catalog
UNINSTALL COMPLETE
All applications and associated Lenovo components have been uninstalled.
Detecting McAfee
McAfee detected
Downloading McAfee Removal Tool
Removing McAfee
McAfee Removal Tool has been run
Attempting to uninstall: [McAfee®]…
PS>TerminatingError(Start-Process): “This command cannot be run due to the error: The system cannot find the file specified.”
WARNING: Failed to uninstall: []
Completed
**********************
Windows PowerShell transcript end
End time: 20240228150423
Thanks for all your hard work!
Hi Alex,
Can you check this exists?
C:\ProgramData\Debloat\Mccleanup.exe
Sometimes other AV apps might remove it before it runs
Yes, that’s there. The end of the mccleanup.log shows this:
DEBUG Exiting uninstallProduct( RESIDUE, C:\ProgramData\Debloat\RESIDUE\RESIDUE.ini ), returning 1
PASS Product RESIDUE successfully removed.
DEBUG Exiting uninstall( … ), returning 0
FAIL Incomplete uninstallation.
DEBUG Entering runPostOps( C:\ProgramData\Debloat\master.ini )
DEBUG IniSection( C:\ProgramData\Debloat\master.ini ), section POST
DEBUG Exiting runPostOps( C:\ProgramData\Debloat\master.ini ), returning 1
Thanks
McAfee is the cockroach of software. Is it still there after a reboot?
I’ve heard the ESET removal tool can remove it, if that works, it has silent parameters so I could add that to the script
https://www.eset.com/uk/support/av-remover/
It’s partly there after a reboot, it leaves a shortcut on the desktop and leaves remnants. If the uninstall errors then would this cause the script to timeout and cause the autopilot process to take longer?
Thanks again for your help!
It shouldn’t cause a timeout because the log showed it completing, but it will mark the script as failed. Are there any running processes left or could the remnants be mopped up with a remediation?
so, if you use the deploy script, where do you run that? I ran it on my local machine, and it did nothing. I would like to use this, but I don’t want Chrome uninstalled. I utilize Autopilot. And would like to deploy this in Intune.
The deploy script will create an application in your Intune tenant with the script in it.
I usually suggest using the debloat-intune-script deployed as a platform script as this will run pre-app install during OOBE
Hi Andrew,
Maybe you can help me, there is a new piece of Lenovo Bloatware on the new G6 devices called:
Lenovo Smart Meeting
Its pinned on taskbar and also in the startmenu, and hidden here:
Local\Packages\E0469640.LenovoSmartCommunication_5grkq8ppsgwt4
Also there is a service running named Lenovo Smart Meeting
Its giving issues to remove this later on, possible to remove this with your script?
Gladly when user start it, its requesting for rights to install it, so thats preventing use for now.
Hi Frans,
I’ll drop you an email to grab some more details and try and incorporate it
Hi,
Trying to add your debloat script as device script(having issues on Lenovo when I run it as an app, so it must run before app install). Is there also a detection script needed? If yes, can you maybe add one in GitHub?
Only run once is best I think?
Hi, you shouldnt need detection for a platform script, they are only for remediations.
no harm in running more than once but probably unnecessary.
If you want to run as a remediation, it creates a log file in programdata which you can use
Hi Andrew, have finally got this to run properly on a device via Intune using the Intunewin option. However McAfee is still hanging on, despite using the latest version of the script. In the Debloat.log it just says it has initialised everything, are there any other logs which can show the error?
Sometimes Mcafee needs a reboot to clear completely.
You could try the application logs in event viewer and see if there is anything listed. It is a constant struggle keeping up with the different versions so it might be worth checking if yours has a different uninstaller which I have missed too.
Hi Andrew,
Is it possible to know why the Xbox application, Skype and other applications like Paint3D and Spotify are still present after deploying the script manually or with intune?
The script seems to work well because some applications are uninstalled like Zune Music or Disney+ but some are present.
Everything was working about 3 weeks ago. Thank you.
Hi,
Any chance you can send me the log file it created? Also, if you run:
get-appxpackage -allusers | out-file c:\temp\apps.txt
Can you check if the apps are listed in the Output.
Yes, the apps are listed in the Output.
How can I send you the log file?
I get the following error on the AppXPackage removals
“An Error Occurred because a user was logged off”
Any ideas?
That’s a new one, are you running during OOBE?
Excellent resource – I’ve got primarily a security question. Is there any way you can make a version of the de-bloat script that has any ‘external’ links or links to github repos removed? To me this seems like a security nightmare. If your github is compromised and the script modified, bad actors can very easily make a change. Then with this script auto-updating and then also referencing other github repos with same issue, just makes me nervous.
I went ahead and downloaded latest version and commented out any references to downloading or running anything from a github repo. Just looking to save anyone else the trouble.
I would normally suggest creating a fork for anyone with those requirements. The external links are often tools which the script needs to run so the risk would be the same if I hosted them elsewhere.
All of the links are to files within the same repo, but you run the risk with any scripts and software from any source.
I could make a light copy without the links, but if the repo is compromised, it won’t make much of a difference as they’ll just change the script.
If it helps, I’m the only admin on the account, it’s secured with MFA and protected by GitGuardian
Appreciate the response – reading through the script there was just a couple thigns that utilized an outside file / source (some HP Stuff and the McAfee and then obviously the double check for most up to date version).
Was there any that I’m missing that point to an external source? If so – yea I’ll either fork it or download manually.
No, just those which are grabbed from the repo. Remember to remove the code signing on the forked version as well or your security restrictions may block it
Thank you for the enhancement with the 4.2.0 (parameter for whitelisting)
Any instructions how to use it?
Add -customwhitelist “App1, App2, App3” etc.
exactly like I suggested? So in the “debloat-intune-script.ps1”
Something like that?
invoke-expression -Command $templateFilePath -customwhitelist “App1, App2, App3” etc.
I tried with: invoke-expression -Command $templateFilePath -customwhitelist “DellInc.DellCommandUpdate”, “Dell Command | Update”, “Dell Command | Update for Windows Universal”
And I got an error message that look like (I translated the message from french): Invoke-Expression : Unable to find a parameter with name corresponding « customwhitelist »
Can you try this:
$arguments = ‘ -customwhitelist “DellInc.DellCommandUpdate”, “Dell Command | Update”, “Dell Command | Update for Windows Universal”’
invoke-expression -Command “$templateFilePath $arguments”
I’ve just updated the script on GitHub as well, add your apps into the speechmarks in the $arguments variable
Hello Andrew, thanks for this amazing script. When I run RemoveBloat.ps1 on lenovo it doesn’t uninstall lenovo commercial vantage, when I check the script
# Uninstall Lenovo Vantage
$path = ‘C:\Program Files (x86)\Lenovo\VantageService\3.13.43.0\Uninstall.exe’
$params = ‘/SILENT’
But when I check my device I see
C:\Program Files (x86)\Lenovo\VantageService\3.13.72.0, can you please check on this.
Hi, just added that into 4.1.5
Thanks for making the change Andrew, instead of writing the version directly can we use the get-childitem so that in future even the version changes the script doesn’t break.
Updated in 4.1.7, hopefully that should work ok
Thanks, but I still see only 4.1.6 in Github
Try now, forgot to press commit…
Hey Andrew, here’s an updated list of Dell crapware I had the misfortune of compiling today.
“Dell Optimizer”
“Dell Power Manager”
“DellOptimizerUI”
“Dell SupportAssist OS Recovery”
“Dell SupportAssist”
“Dell Optimizer Service”
“Dell Optimizer Core”
“DellInc.PartnerPromo”
“DellInc.DellOptimizer”
“DellInc.DellCommandUpdate”
“DellInc.DellPowerManager”
“DellInc.DellDigitalDelivery”
“DellInc.DellSupportAssistforPCs”
“DellInc.PartnerPromo”
“Dell Command | Update”
“Dell Command | Update for Windows Universal”
“Dell Command | Update for Windows 10”
“Dell Command | Power Manager”
“Dell Digital Delivery Service”
“Dell Digital Delivery”
“Dell Peripheral Manager”
“Dell Power Manager Service”
“Dell SupportAssist Remediation”
“SupportAssist Recovery Assistant”
“Dell SupportAssist OS Recovery Plugin for Dell Update”
“Dell SupportAssistAgent”
“Dell Update – SupportAssist Update Plugin
“Dell Core Services”
“Dell Pair”
“Dell Display Manager 2.0”
“Dell Display Manager 2.1”
“Dell Display Manager 2.2”
“Dell SupportAssist Remediation”
“Dell Update – SupportAssist Update Plugin”
“DellInc.PartnerPromo”
Amazing, thank you. Updated now 🙂
Sadly, the list is slightly longer, however they’re not recognized by Intune, went digging through the program files folders. And while the apps above are on the list, they won’t necessarily be removed (for whatever reason) which I don’t believe is the scripts fault per se, more like Dell’s dodgy application development.
Awesome work! Thank You!
This is awesome! Been struggeling for months to get rid of bloatware. Thanks Andrew! Are you planning to remove the Dev Home (and Windows Backup) One of these days?
Hi,
The latest version should remove Dev Home as that’s an Appx package. Windows Backup is tied into the OS itself so at the moment can’t be removed at all unfortunately
Thank you for the quick reply,
The version is McAfee LiveSafe McAfee, LLC 9/29/2023 1.05gb 16.0 R48
I’ve had luck manually with this removal package but had to do some trickery, like setting the time/data on the machine back to 2020 then running it. I just haven’t figured out how to adjust your script to utalize this uninstaller.
https://www.urtech.ca/2019/04/sovled-mcafee-removal-tool-uninstaller/
Thanks again for assistance, I’m in the process of deploying 200+ machines and this is making my life 100x easier.
Hey Andrew!
Thank you for all the work on this!!!
We’re currently having issues with McAfee getting removed, it appears that the uninstall package now has a captcha in it to prevent it being ran via a script?
Hi, McAfee is always a nightmare. Can you confirm which version you have and I’ll see if there is a way around it.
Thank you for the quick reply,
The version is McAfee LiveSafe McAfee, LLC 9/29/2023 1.05gb 16.0 R48
I’ve had luck manually with this removal package but had to do some trickery, like setting the time/data on the machine back to 2020 then running it. I just haven’t figured out how to adjust your script to utalize this uninstaller.
https://www.urtech.ca/2019/04/sovled-mcafee-removal-tool-uninstaller/
Thanks again for assistance, I’m in the process of deploying 200+ machines and this is making my life 100x easier.
Does option 2 on that list work? The ESET tool? That one has a silent switch so I could download and run that in the script
Hi Andrew,
Great script which I have been testing, thanks for putting it together!
I’m deploying it via Intune as a Platform Script and it is failing on all 4 of my test machines? I don’t see any errors in Intune to understand why. If I run RemoveBloat.ps1 locally it elevates to admin and most of it seems to work fine. The start menu on Windows 11 doesn’t reset though, so I’m trying to manually work around removing the shortcuts it has to the likes of Adobe Offers and Booking.com.
Could I request you add ExpressVPN and Dropbox promotion apps as well, as these are coming as part of my default install and not being removed.
Much appreciated!
Hi,
Can you check the log file and also the registry to see if there is an error which may be sending the fail response.
Start menu only applies when a new user logs in, have you configured one in Intune? That will fix it for existing users.
Can you send over the exact names they display as in the registry/appx and I’ll add them in
The log file as in the one that gets written to the Debloat directory?
I have configured a start menu today, have synced and run a couple of reboots but it isn’t picking it up yet. Will keep trying on that one.
I’m struggling to find it for ExpressVPN, sorry to be dumb on this, but where would I find the names? This is what I find for Dropbox when running the GetAppx command in Powershell:-
Name : C27EB4BA.DropboxOEM
Publisher : CN=852D08DC-3DFB-4331-AD77-990D03FE9E36
Architecture : X64
ResourceId :
Version : 23.4.21.0
PackageFullName : C27EB4BA.DropboxOEM_23.4.21.0_x64__xbfy0k16fey96
InstallLocation : C:\Program Files\WindowsApps\C27EB4BA.DropboxOEM_23.4.21.0_x64__xbfy0k16fey96
IsFramework : False
PackageFamilyName : C27EB4BA.DropboxOEM_xbfy0k16fey96
PublisherId : xbfy0k16fey96
IsResourcePackage : False
IsBundle : False
IsDevelopmentMode : False
NonRemovable : False
Dependencies : {Microsoft.VCLibs.140.00_14.0.32530.0_x64__8wekyb3d8bbwe,
Microsoft.NET.Native.Framework.2.2_2.2.29512.0_x64__8wekyb3d8bbwe,
Microsoft.NET.Native.Runtime.2.2_2.2.28604.0_x64__8wekyb3d8bbwe,
C27EB4BA.DropboxOEM_23.4.21.0_neutral_split.scale-100_xbfy0k16fey96…}
IsPartiallyStaged : False
SignatureKind : Store
Status : Ok
I’ve just added Dropbox to the latest version, hopefully that should work ok
Hello Andrew,
Excellent script overall and I really appreciate your work to update it. I’ve run into an issue that I hope you can help solve. I have the latest available version of your script assigned in Intune to all devices, as all the devices are new Windows 11 23R2 systems from Lenovo. I have also added both the M365 Apps for Enterprise version of Teams, and the “New Teams” app apckages to the whitelist. However, while the script is properly removing the built-in Teams client as expected, it also removes the full version of Teams or New Teams that is deployed as part of the M365 Apps for Enterprise package I install on clients as well. The script seems to run after the M365 Apps package installs on sporadic systems. Is there any way to prevent this from occurring, as our users need the enterprise version of Teams (or New Teams if they install it). Any thoughts?
Hi, Any chance you can send me the logs and I’ll see what’s happening. It should ignore any apps deployed via Intune so will be interesting to see what has triggered it
Hi Andrew, thank you very much for the scrupt, the intune deployment worked perfectly for me!
If possible i would like to request some more apps that i saw left over on my System (guess it is country dependant), in case you would agree its pure junk:
– WhatsApp
– Camo Studio
– LinkedIn
– Kindle
Hi,
Can you send the output of get-appxpackage -allusers | out-file c:\temp\apps.txt
I think they may be start menu stubs which are removed by setting a start menu, but if not they’ll show in the output
Hi Andrew,
Yes you are right it was stubs, I realized that from your answer to someone else above. Thanks!
Having an issue with snip & sketch not working after the script having been run. Is this being removed? I can’t seem to find a line which would be doing this.
Windows 10 or 11? It may be the backup removal as that strips a feature pack
windows 11
Not backup removal then. Is it installed and not working or missing completely?
looked to be installed but wouldn’t function. When clicking “new” in the app it wouldn’t work.
Are you blocking Windows store or anything like that?
Hello, is there anyway to reinstall co-pilot? and how would I exclude from being removed, would it be remove lines 827 – 925?
Hi,
If you remove the reg keys, or switch the value to 0, that will re-enable it. It’s hidden rather than uninstalled.
Yes, remove or comment out those lines to stop it being removed.
As this is a run-once script, you could also add a second script, or policy to re-enable co-pilot on selected machines
That’s great thanks
Hi andrewstaylor.com administrator, Thanks for the well-organized post!
Thank you 🙂
Nevermind my last comment, figured it out.
Thanks again for the script!
You beat me to it 🙂
I’ve added extra logic into the latest version as well to stop it uninstalling anything after login.
For anyone else reading, lines 1668 – 1758 simply need removing to stop any app uninstalls outside appx, manufacturer bloat and McAfee
Hi Andrew,
First of all thank you, this is very helpful.
But somehow the script deletes too much on our endpoints.
Parts of the Citrix Workspace App.
Eventhough they are deployed as Win32 apps.
Can you tell me what I need to comment out so it only deletes the appx packages?
Thanks again.
We have this set as a platform script in Intune. Which should only run once and not again. This runs during the autopilot provisioning process. Today this script ran again. I know that if the script detects Win32 apps installed by Intune it is not supposed to run. Any idea why it would have ran again. 1 being the platform script running again months later. 2 this script removing apps after we have pushed apps via Intune. Thanks for any input.
It looks like a recent intune update has re-installed IME which has triggered scripts to re-run (not something I’ve ever seen before).
I’ve added extra logic in version 4.1.0 which also checks if a non-admin user has logged into the device before running any uninstalls. Hopefully that will fix it in the future.
Where in the script is this logic? Thanks!
Lines 1650 – 1668
Have you had any reports of OneDrive uninstalling on systems running the script? I started getting reports yesterday (11/30/23) of OneDrive disappearing. I checked the Debloat.log and didn’t see anything related to OneDrive, but all systems missing OneDrive had the script run the same day. Everyone is running the latest version of OneDrive: 23.226.1031.0003.
Hi,
It shouldn’t do, if it runs outside of OOBE it skips all app uninstalls. I’ve added it to the exclusions list in case it is grabbing during ESP/OOBE just in case. Which OS are you running? I’ll do some testing this end as well
We have good data on this if you need it. We’ve got a number of machines that for some reason the script ran again as part of an IME reinstall or update, and removed OneDrive, and other apps that had been installed after it ran the first time.
It looks like a recent intune update has re-installed IME which has triggered scripts to re-run (not something I’ve ever seen before).
I’ve added extra logic in version 4.1.0 which also checks if a non-admin user has logged into the device before running any uninstalls. Hopefully that will fix it in the future.
Uninstalling McAfee did not work on my Lenovo E16.
According to the comments I am not alone here, does the uninstallation of MCAfee currently work?
Can you confirm the version installed and any errors in the log?
I don’t have any machines with it installed so it’s difficult to test when new versions are released. If you can share the logs, I can see what’s happening
Hi I’m looking to run this now via Intune but unsure as to how it should run to newly created devices using autopilot and not affect existing devices. Also since you’ve signed the script does that mean on Intune we can select “Yes” on the option “Enforce script signature check
“?
Thanks
Hi,
It shouldn’t damage existing devices unless your users are using the bloated apps. There is logic to ignore anything win32 if the device has apps deployed. If you want to be extra careful, you could drop some logic at the top to only run if a user profile doesn’t exist for example.
Yes, you should be able to enforce a signature check now as it is signed and time stamped
Thanks for the quick reply. Would that remove bloatware from the existing users as well or for any new users only? The script I’ve configured to use is the debloat-intune-script.ps1 so I presume that logic won’t work unless I used the RemoveBloat.ps1 script?
It would remove for existing users as well as new users, most of the script is at the system level.
Yes, you would need to add the logic into the script deployed into Intune (and remove the signed bit as the cert won’t be valid).
Two other options:
1) Deploy as a Win32 app with a custom requirement
2) Create a new autopilot profile and a dynamic group based on the profile name and assign the script to that group
Hi,
so i like the script and running it manually works like a charm. i also tried using it via Intune as a device-Script. What is interesting is, that when the Device-Part of the Autopilot Enrollment is complete (Enrollment Status Page) i get an Admin-Prompt as soon as i enter my Login-Credentials.
I used the following Settings for the Script:
PowerShell script
RemoveBloat.ps1
Run this script using the logged on credentials: Yes <-Maybe this is wrong?
Enforce script signature check: No
Run script in 64 bit PowerShell Host: Yes
Hi,
You need to switch it to run in the System context. It will be trying to elevate for the registry and SetACL parts
Hi,
Yeah Thanks that did the Trick. Really i great script and makes our work so much easier.
Excellent, always happy to make improvements too 🙂
I’m having to run this ad-hoc after software is installed and users are logged in as we didn’t remove bloatware during deployment for a while. What section do I need to comment out/delete to keep software installed?
It has logic built in for Win32 apps, if it detects any installed by Intune, it won’t remove anything.
If you’re not using Intune, remove 1599-1744
Hello, what lines will it be now as the script has changed so much please.
Thanks
Hi,
This script is constantly changing. Copilot now starts 853, it has it’s own section so should be easy to find
I have found co-pilot but what about any apps that are already installed? I don’t want to remove too much from the script.
Thanks
I’m not sure what you mean? You only asked about Copilot
Hello,
I’ve been using your script in production for a while now and it’s going very well.
I used the 4.0.10 script update and added my customizations. Great additions, thanks.
Suggestion to disable Copilot. Add the TurnOffWindowsCopilot key to the default profile in addition to the users already created, as your script already does.
I use Windows 11 23H2 media. The script is applied during an SCCM OSD task sequence. The value TurnOffWindowsCopilot is present in HKLM, but Copilot is activated for all new users.
Also, this strategy is not yet available in Intune’s Profile configuration.
Hi,
That’s a great idea, I’ve added it into 4.0.11 which is now live.
I tried version 4.0.11 of your script.
There was probably some confusion between the default profile used for login (.Default) and the default profile user used to create new profiles. Sorry about that.
I load the hive from c:\users\Default\NTUSER.dat, then add the key and unload the hive.
Ah, try 4.0.12, I’ve added it with a load and unload
Everything worked.
Thanks again.
Excellent 🙂
Hi,
Since the last version of the script, we noticed that some services are not starting.
Also, installing applications gives errors.
I cannot find anything specific in the log file.
Any ideas?
Hi,
Which OS and version are you running? Also which services and applications are failing? I’ll try and match the environment and test
Cheers! Thank you for that!
Hi Andrew
Thank you for this great Script!
Is it possible that this script also sets a setting that apps which should manually (user or system context) are not installing or running?
for example: Teamviewer QS is not starting when i download and run it… just nothing happens no task visible in Taskmanager.
Regards
Hi,
No, there isn’t anything in here which would cause problems with applications running. I have used it on machines running Teamviewer QS as well.
Thank you,
Does current script remove any pre installed win32 apps ? for example chrome .. or other apps how to exempt it ?
If run during OOBE, yes, it removes any non-whitelisted Win32 apps, starting at line 1557
Whitelisted apps array on 1617
I ran the command below to remove the outlook everything still works fine
https://www.reddit.com/r/sysadmin/comments/16jexcp/the_new_outlook_preview_uninstall_with_powershell/
Yes, but to use M365 copilot to search emails, it needs new outlook:
https://learn.microsoft.com/en-us/microsoft-365-copilot/microsoft-365-copilot-requirements
I imagine many will want to use it so I don’t want to remove it with the script and create work for people
One last question i plan to use this as an upgrade from win10 to win11 does it remove any pre installed win32 apps ?
Hi Andrew i see a lot of cmd boxes popup when running it locally will there be cmd box popup if ran through Intune as scripts ? can these boxes be suppressed i want to fully run the script silently
also i see that outlook new and get started are not removed. may need to be added.
Great work other than that love it.
thanks
Hi, you won’t see any popups in Intune, it will all run in the system context.
Getting Started can’t be removed, it’s used by Intune for Organizational messages.
Outlook new is a tricky one as it’s a requirement for M365 Copilot so I don’t want to remove that one here
Hi Andrew, could it be that the app is removed in the section with “#Removes AppxPackages” if it is not whitelisted?
You can either whitelist, or remove it from the bloat list. Both will work
Should mention its on windows 11 23h2 machines.
Hi Andrew.
I am getting the Remote Desktop (mstsc) program removed. And we use it for connecting to a Microsoft Remotes desktop farm.
Is it enough to remove “Microsoft.RemoteDesktop” from the “$bloatware” section?
Hi,
Yes, just remove it from the list and it will leave it. The store version of the app is better though so it might be worth comparing the two
Great script. Truly the debloat to rule them all. We’re only experiencing one issue
Even though I see nothing to indicate its removal in the log file, the script appears to remove the win+shift+B “MS-Screenclip” protocol handler for the snipping tool on Windows 10 22h2 devices. Reinstalling snipping tool, snip and sketch, etc, using the Store or add-appxpackage didn’t fix it. If you’d hit win+shift+b nothing would happen. If you opened snip and sketch and then clicked “new”, you’d get a pop-up prompting to find an app for “MS-screenclip” in the store, and we block the public store. After much head banging, we found this restored functionality:
DISM /Online /Add-Capability /CapabilityName:Windows.Client.ShellComponents~~~~0.0.1.0
Any ideas?
It’s probably Windows Backup. To remove it I have to strip out an entire experience pack which probably includes ScreenClip.
I’ve added your DISM command beneath the windows backup removal which should hopefully fix it (until MS release a proper removal for backup)
Hey Andrew,
I ran as a device script on a newly delivered Optiplex Micro w/W11Pro 22H2 in Autopilot and it worked like a champ, especially with all the Dell crap. However, it left a couple things installed that the log shows removed: “Cortana” – I was able to remove it with “Get-AppxPackage – allusers Microsoft.549981C3F5F10 | Remove AppxPackage” (which is the same in the script) and it removed with no errors…so I’m confused why that still showed up. “Get Started” – I do not find in Get-AppxPackage but still showing up on device; I cannot find any way to uninstall it. “Microsoft To Do” – the package name apparently changed to “Microsoft.Todos”; I was able to uninstall using the new name. Lastly, can you add “Microsoft.PowerAutomateDesktop” to the script? That’s a new one showing up.
Thanks!
Hi Ryan,
I have just pushed out 4.0.7 with those additions. I’ve also added a second removal for Cortana after disabling the services to see if that helps
Thanks
Andrew
Hi Andrew,
Thanks for the fantastic script. Should I run it as an app during the Autopilot process, or after as a device script? I’m curious if it impacts the setup speed during the OOBE process.
Thanks!
Hi,
I normally run as a device script as the last section uninstalls anything detected which is not specifically listed, but only if Intune hasn’t started app deployment yet. As soon as the first app installs, it skips that section (in case it runs on existing devices)
Depending on the machine, it shouldn’t add more than 2-3 minutes onto OOBE
Hi, the script works great thanks! We’re removing bloat from our devices now, but we want to keep HP Support Assistant. I deleted HP Support Assistant from the ‘to be removed’ apps, but it’s still deleted after the script ran. Am I missing something here?
Hi,
You probably need to remove this as well from each query:
-or ($_.Name -match “^$HPidentifier”)
HP Support Assistant starts with the Identifier so it will be caught there
Name : RealtekSemiconductorCorp.HPAudioControl
Publisher : CN=83564403-0B26-46B8-9D84-040F43691D31
Architecture : X64
ResourceId :
Version : 2.39.280.0
PackageFullName : RealtekSemiconductorCorp.HPAudioControl_2.39.280.0_x64__dt26b99r8h8gj
InstallLocation : C:\Program
Files\WindowsApps\realteksemiconductorcorp.hpaudiocontrol_2.39.280.0_x64__dt26b99r8h8gj
IsFramework : False
PackageFamilyName : RealtekSemiconductorCorp.HPAudioControl_dt26b99r8h8gj
PublisherId : dt26b99r8h8gj
Perfect, thank you! I’ve updated 4.0.5 with the new package name
Where can I find it? Can it be “RealtekSemiconductorCorp.HPAudioControl_dt26b99r8h8gj”?
Andrew, you are awesome.
If I want to adapt the script to maintain some apps, should I remove this function: Function Get-ScriptVersion()?
By the way, I’ve tried it in HP devices and RealtekSemiconductorCorp.HPAudioControl wasn’t uninstalled.
Thanks a lot.
Hi,
If you are using the removebloat script, you don’t need to remove anything. That will just alert, but won’t actually do anything.
Can you send me the uninstall string for that one and I’ll get it fixed.
I’m getting the following in the log when the machine is not connected to VPN or on-Site network, I’m assuming this is the SID lookup.
“The trust relationship between this workstation and the primary domain failed. (Exception from HRESULT: 0x800706FD)”
That’s unlikely to be caused by the script. Has the machine been off VPN for a while, or renamed?
The script always uninstalls MS Teams for me which is installed in ESP. M365 was configured with XML and created via M365 App in Intune.
Are you running as a device script?
Is this recent? Teams is no longer included in the M365 XML in Europe so it could be that rather than the script
thank you so much for the new version. While now I’m not getting any errors in the logs, I still see SupportAssit REcovery Assistant. Give me your email address and I’ll send you the logs
That’s good progress, drop me an email through the contact form here and I’ll reply with some things to send over along with the logs
HI Andrew,
Many thanks for this wonderful tool. I was running an older version till now and no problems. However, since I’ve tried 3.0.5 and 3.0.6 I’m seeing Dell command update to continue showing. (it was supposed to be deleted) When I look a the logs I can see an error when Command update is being uninstalled. Is there anything I can do to fix this? or maybe you could point me in the right direction.
Thanks in advance.
Hi David,
Can you try 3.0.7 and see if that works any better? It looks like the application has been renamed so it wasn’t picking it up.
If that still fails, can you email me a copy of the logs and I’ll see what’s happening
Never mind, right click save as before loading into the script pulls it down as 387kb, if go into the file and save it that way, then 57kb. Was jumping the gun :p
Moans now if try to use it as a script:
“Selected file ‘RemoveBloat.ps1’ must be between 1 and 200000 bytes”
Hi,
Does this remove office 365 that comes preinstalled with w11. We have some issues where our office 2019 std package fails due to it being preinstalled so i would really like for it to get removed.
Thanks!
/Jonas
As long as you run it during OOBE, it should remove it for you
Thanks, i’ll try it. Two other questions:
1- if I want to add Minecraft to the whitelist, how should I write it? In your script, it is written as #”*Minecraft*”.
2- It seems that when the script is executed on an Intune device, the screensaver or lock screen no longer appears after 15 minutes. I left it open yesterday, and this morning, it wasn’t locked (after 12 hours!) Thank you very much for your help!
For 1 I would remove that from the bloat list, then run “get-appxpackage -allusers” on an elevated prompt to find the exact name of the one you want to keep (I’m guessing it’s the Edu version), then add that into the whitelist.
There shouldn’t be anything to block the screensaver in there, could you have an Intune policy in place which is stopping it?
Name Version Source ProviderName
—- ——- —— ————
Office 16 Click-to-Run Extensibility Component 16.0.16130.20218 msi
Office 16 Click-to-Run Localization Component 16.0.16130.20218 msi
Office 16 Click-to-Run Licensing Component 16.0.16327.20264 msi
Microsoft Visual C++ 2022 X64 Additional Runtime – 14.34.31931 14.34.31931 msi
Dell SupportAssist 3.14.1.14 C:\Program Files\Dell\SupportAssistAgent\ msi
Dell Optimizer 4.1.206.0 C:\Program Files\Dell\DellOptimizer\ msi
Microsoft Intune Management Extension 1.71.111.0 msi
Dell Digital Delivery Services 5.0.82.0 C:\Program Files (x86)\Dell Digital Delivery Services\ msi
Dell Command | Update for Windows Universal 4.8.0 C:\Program Files\Dell\CommandUpdate\ msi
Dell Core Services 1.2.342.3 C:\Program Files\Dell\ msi
Microsoft .NET Host – 6.0.18 (x64) 48.75.61559 msi
Microsoft .NET Runtime – 6.0.18 (x64) 48.75.61559 msi
PaperCut Print Deploy Client 1.7.1670 msi
Dell SupportAssist OS Recovery Plugin for Dell Update 5.5.7.18775 C:\Program Files\Dell\SARemediation\plugin\ msi
Dell SupportAssist OS Recovery Plugin for Dell Update 5.5.7.18775 Programs
Dell SupportAssist Remediation 5.5.7.18775 C:\Program Files\Dell\SARemediation\agent\ msi
Dell SupportAssist Remediation 5.5.7.18775 Programs
Microsoft Visual C++ 2022 X64 Minimum Runtime – 14.34.31931 14.34.31931 msi
DellOptimizerUI 4.1.206.0 C:\Program Files (x86)\Dell\DellOptimizer\ msi
Dell Trusted Device Agent 5.4.164.0 c:\Program Files\Dell\TrustedDevice\ msi
Microsoft Windows Desktop Runtime – 6.0.18 (x64) 48.75.61602 msi
Microsoft Windows Desktop Runtime – 6.0.18 (x64) 6.0.18.32522 Programs
Microsoft .NET Host FX Resolver – 6.0.18 (x64) 48.75.61559 msi
Dell Display Manager 2.1 2.1.1.21 Programs
Dell Peripheral Manager 1.6.7 Programs
Microsoft 365 – en-us 16.0.16327.20264 Programs
Microsoft 365 – es-es 16.0.16327.20264 Programs
Microsoft 365 – fr-fr 16.0.16327.20264 Programs
Microsoft 365 – pt-br 16.0.16327.20264 Programs
Microsoft OneNote – en-us 16.0.16327.20264 Programs
Microsoft OneNote – es-es 16.0.16327.20264 Programs
Microsoft OneNote – fr-fr 16.0.16327.20264 Programs
Microsoft OneNote – pt-br 16.0.16327.20264 Programs
Microsoft OneDrive 23.189.0910.0001 Programs
Microsoft Edge 117.0.2045.55 Programs
Microsoft Edge Update 1.3.177.11 Programs
Microsoft Edge WebView2 Runtime 117.0.2045.55 Programs
Dell Optimizer Core 4.1.206.0 Programs
Dell Watchdog Timer 1.2.1.0 Programs
Microsoft Visual C++ 2015-2022 Redistributable (x64) – 14.34.31931 14.34.31931.0 Programs
9NBLGGH51CLL-Microsoft.Services.Store.Engagement msu
9P5VK8KZB5QZ-Microsoft.UI.Xaml.2.7 msu
2023-09 Mise à jour pour Windows 11 Version 22H2 sur systèmes x64 (KB5031274) msu
2023-09 Mise à jour pour Windows 11 Version 22H2 sur systèmes x64 (KB5030323) msu
Try adding this to the whitelist:
“Dell Command | Update for Windows”
############################################################################################################
# Initial Setup #
# #
############################################################################################################
##Elevate if needed
If (!([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole]’Administrator’)) {
Write-Host “You didn’t run this script as an Administrator. This script will self elevate to run as an Administrator and continue.”
Start-Sleep 1
Write-Host ” 3″
Start-Sleep 1
Write-Host ” 2″
Start-Sleep 1
Write-Host ” 1″
Start-Sleep 1
Start-Process powershell.exe -ArgumentList (“-NoProfile -ExecutionPolicy Bypass -File `”{0}`”” -f $PSCommandPath) -Verb RunAs
Exit
}
#no errors throughout
$ErrorActionPreference = ‘silentlycontinue’
#Function Get-ScriptVersion(){
#[cmdletbinding()]
#
#param
#(
# $liveuri
# )
#$contentheaderraw = (Invoke-WebRequest -Uri $liveuri -Method Get)
#$contentheader = $contentheaderraw.Content.Split([Environment]::NewLine)
#$liveversion = (($contentheader | Select-String ‘Version:’) -replace ‘[^0-9.]’,”) | Select-Object -First 1
#$currentversion = ((Get-Content -Path $PSCommandPath | Select-String -Pattern “Version: *”) -replace ‘[^0-9.]’,”) | Select-Object -First 1
#if ($liveversion -ne $currentversion) {
#write-host “Script has been updated, please download the latest version from $liveuri” -ForegroundColor Red
#}
#}
#Get-ScriptVersion -liveuri “https://raw.githubusercontent.com/andrew-s-taylor/public/main/De-Bloat/RemoveBloat.ps1”
#Create Folder
$DebloatFolder = “C:\ProgramData\Debloat”
If (Test-Path $DebloatFolder) {
Write-Output “$DebloatFolder exists. Skipping.”
}
Else {
Write-Output “The folder ‘$DebloatFolder’ doesn’t exist. This folder will be used for storing logs created after the script runs. Creating now.”
Start-Sleep 1
New-Item -Path “$DebloatFolder” -ItemType Directory
Write-Output “The folder $DebloatFolder was successfully created.”
}
Start-Transcript -Path “C:\ProgramData\Debloat\Debloat.log”
$locale = Get-WinSystemLocale | Select-Object -expandproperty Name
##Switch on locale to set variables
## Switch on locale to set variables
switch ($locale) {
“ar-SA” {
$everyone = “الجميع”
$builtin = “مدمج”
}
“bg-BG” {
$everyone = “Всички”
$builtin = “Вграден”
}
“cs-CZ” {
$everyone = “Všichni”
$builtin = “Vestavěný”
}
“da-DK” {
$everyone = “Alle”
$builtin = “Indbygget”
}
“de-DE” {
$everyone = “Jeder”
$builtin = “Integriert”
}
“el-GR” {
$everyone = “Όλοι”
$builtin = “Ενσωματωμένο”
}
“en-US” {
$everyone = “Everyone”
$builtin = “Builtin”
}
“en-GB” {
$everyone = “Everyone”
$builtin = “Builtin”
}
“es-ES” {
$everyone = “Todos”
$builtin = “Incorporado”
}
“et-EE” {
$everyone = “Kõik”
$builtin = “Sisseehitatud”
}
“fi-FI” {
$everyone = “Kaikki”
$builtin = “Sisäänrakennettu”
}
“fr-FR” {
$everyone = “Tout le monde”
$builtin = “Intégré”
}
“he-IL” {
$everyone = “כולם”
$builtin = “מובנה”
}
“hr-HR” {
$everyone = “Svi”
$builtin = “Ugrađeni”
}
“hu-HU” {
$everyone = “Mindenki”
$builtin = “Beépített”
}
“it-IT” {
$everyone = “Tutti”
$builtin = “Incorporato”
}
“ja-JP” {
$everyone = “すべてのユーザー”
$builtin = “ビルトイン”
}
“ko-KR” {
$everyone = “모든 사용자”
$builtin = “기본 제공”
}
“lt-LT” {
$everyone = “Visi”
$builtin = “Įmontuotas”
}
“lv-LV” {
$everyone = “Visi”
$builtin = “Iebūvēts”
}
“nb-NO” {
$everyone = “Alle”
$builtin = “Innebygd”
}
“nl-NL” {
$everyone = “Iedereen”
$builtin = “Ingebouwd”
}
“pl-PL” {
$everyone = “Wszyscy”
$builtin = “Wbudowany”
}
“pt-BR” {
$everyone = “Todos”
$builtin = “Integrado”
}
“pt-PT” {
$everyone = “Todos”
$builtin = “Incorporado”
}
“ro-RO” {
$everyone = “Toată lumea”
$builtin = “Incorporat”
}
“ru-RU” {
$everyone = “Все пользователи”
$builtin = “Встроенный”
}
“sk-SK” {
$everyone = “Všetci”
$builtin = “Vstavaný”
}
“sl-SI” {
$everyone = “Vsi”
$builtin = “Vgrajen”
}
“sr-Latn-RS” {
$everyone = “Svi”
$builtin = “Ugrađeni”
}
“sv-SE” {
$everyone = “Alla”
$builtin = “Inbyggd”
}
“th-TH” {
$everyone = “ทุกคน”
$builtin = “ภายในเครื่อง”
}
“tr-TR” {
$everyone = “Herkes”
$builtin = “Yerleşik”
}
“uk-UA” {
$everyone = “Всі”
$builtin = “Вбудований”
}
“zh-CN” {
$everyone = “所有人”
$builtin = “内置”
}
“zh-TW” {
$everyone = “所有人”
$builtin = “內建”
}
default {
$everyone = “Everyone”
$builtin = “Builtin”
}
}
############################################################################################################
# Remove AppX Packages #
# #
############################################################################################################
#Removes AppxPackages
$WhitelistedApps = ‘Microsoft.WindowsNotepad|Microsoft.CompanyPortal|Microsoft.ScreenSketch|Microsoft.Paint3D|Microsoft.WindowsCalculator|Microsoft.WindowsStore|Microsoft.Windows.Photos|CanonicalGroupLimited.UbuntuonWindows|`
|Microsoft.MicrosoftStickyNotes|Microsoft.MSPaint|Microsoft.WindowsCamera|.NET|Framework|Microsoft.MicrosoftSolitaireCollection|Microsoft.Whiteboard|Microsoft.WindowsAlarms|Microsoft.WindowsCamera|Microsoft.Office.Lens|Microsoft.Print3D|Microsoft.RemoteDesktop|`
Microsoft.HEIFImageExtension|Microsoft.ScreenSketch|Microsoft.StorePurchaseApp|Microsoft.VP9VideoExtensions|Microsoft.WebMediaExtensions|Microsoft.WebpImageExtension|Microsoft.DesktopAppInstaller|WindSynthBerry|MIDIBerry|Slack’
#NonRemovable Apps that where getting attempted and the system would reject the uninstall, speeds up debloat and prevents ‘initalizing’ overlay when removing apps
$NonRemovable = ‘1527c705-839a-4832-9118-54d4Bd6a0c89|c5e2524a-ea46-4f67-841f-6a9465d9d515|E2A4F912-2574-4A75-9BB0-0D023378592B|F46D4000-FD22-4DB4-AC8E-4E1DDDE828FE|InputApp|Microsoft.AAD.BrokerPlugin|Microsoft.AccountsControl|`
Microsoft.BioEnrollment|Microsoft.CredDialogHost|Microsoft.ECApp|Microsoft.LockApp|Microsoft.MicrosoftEdgeDevToolsClient|Microsoft.MicrosoftEdge|Microsoft.PPIProjection|Microsoft.Win32WebViewHost|Microsoft.Windows.Apprep.ChxApp|`
Microsoft.Windows.AssignedAccessLockApp|Microsoft.Windows.CapturePicker|Microsoft.Windows.CloudExperienceHost|Microsoft.Windows.ContentDeliveryManager|Microsoft.Windows.Cortana|Microsoft.Windows.NarratorQuickStart|`
Microsoft.Windows.ParentalControls|Microsoft.Windows.PeopleExperienceHost|Microsoft.Windows.PinningConfirmationDialog|Microsoft.Windows.SecHealthUI|Microsoft.Windows.SecureAssessmentBrowser|Microsoft.Windows.ShellExperienceHost|`
Microsoft.Windows.XGpuEjectDialog|Microsoft.XboxGameCallableUI|Windows.CBSPreview|windows.immersivecontrolpanel|Windows.PrintDialog|Microsoft.XboxGameCallableUI|Microsoft.VCLibs.140.00|Microsoft.Services.Store.Engagement|Microsoft.UI.Xaml.2.0|*Nvidia*’
Get-AppxPackage -AllUsers | Where-Object {$_.Name -NotMatch $WhitelistedApps -and $_.Name -NotMatch $NonRemovable} | Remove-AppxPackage
Get-AppxPackage -allusers | Where-Object {$_.Name -NotMatch $WhitelistedApps -and $_.Name -NotMatch $NonRemovable} | Remove-AppxPackage
Get-AppxProvisionedPackage -Online | Where-Object {$_.PackageName -NotMatch $WhitelistedApps -and $_.PackageName -NotMatch $NonRemovable} | Remove-AppxProvisionedPackage -Online
##Remove bloat
$Bloatware = @(
#Unnecessary Windows 10/11 AppX Apps
“Microsoft.BingNews”
“Microsoft.GetHelp”
“Microsoft.Getstarted”
“Microsoft.Messaging”
“Microsoft.Microsoft3DViewer”
“Microsoft.MicrosoftOfficeHub”
“Microsoft.NetworkSpeedTest”
“Microsoft.MixedReality.Portal”
“Microsoft.News”
“Microsoft.Office.OneNote”
“Microsoft.Office.Sway”
“Microsoft.OneConnect”
“Microsoft.People”
“Microsoft.SkypeApp”
“Microsoft.StorePurchaseApp”
“Microsoft.Office.Todo.List”
“microsoft.windowscommunicationsapps”
“Microsoft.WindowsFeedbackHub”
“Microsoft.WindowsMaps”
“Microsoft.WindowsSoundRecorder”
“Microsoft.Xbox.TCUI”
“Microsoft.XboxApp”
“Microsoft.XboxGameOverlay”
“Microsoft.XboxIdentityProvider”
“Microsoft.XboxSpeechToTextOverlay”
“Microsoft.ZuneMusic”
“Microsoft.ZuneVideo”
“MicrosoftTeams”
“Microsoft.YourPhone”
“Microsoft.XboxGamingOverlay_5.721.10202.0_neutral_~_8wekyb3d8bbwe”
“Microsoft.GamingApp”
“SpotifyAB.SpotifyMusic”
“Disney.37853FC22B2CE”
“*EclipseManager*”
“*ActiproSoftwareLLC*”
“*AdobeSystemsIncorporated.AdobePhotoshopExpress*”
“*Duolingo-LearnLanguagesforFree*”
“*PandoraMediaInc*”
“*CandyCrush*”
“*BubbleWitch3Saga*”
“*Wunderlist*”
“*Flipboard*”
“*Twitter*”
“*Facebook*”
“*Spotify*”
“*Minecraft*”
“*Royal Revolt*”
“*Sway*”
“*Speed Test*”
“*Dolby*”
“*Office*”
“*Disney*”
“clipchamp.clipchamp”
“*gaming*”
“MicrosoftCorporationII.MicrosoftFamily”
#Optional: Typically not removed but you can if you need to for some reason
#”*Microsoft.Advertising.Xaml_10.1712.5.0_x64__8wekyb3d8bbwe*”
#”*Microsoft.Advertising.Xaml_10.1712.5.0_x86__8wekyb3d8bbwe*”
#”*Microsoft.BingWeather*”
#”*Microsoft.MSPaint*”
#”*Microsoft.MicrosoftStickyNotes*”
#”*Microsoft.Windows.Photos*”
#”*Microsoft.WindowsCalculator*”
#”*Microsoft.WindowsStore*”
#”Microsoft.MicrosoftSolitaireCollection”
#”Microsoft.Whiteboard”
#”Microsoft.WindowsAlarms”
#”Microsoft.WindowsCamera”
#”Microsoft.Office.Lens”
#”Microsoft.Print3D”
#”Microsoft.RemoteDesktop”
)
foreach ($Bloat in $Bloatware) {
Get-AppxPackage -allusers -Name $Bloat| Remove-AppxPackage -AllUsers
Get-AppxProvisionedPackage -Online | Where-Object DisplayName -like $Bloat | Remove-AppxProvisionedPackage -Online
Write-Host “Trying to remove $Bloat.”
}
############################################################################################################
# Remove Registry Keys #
# #
############################################################################################################
##We need to grab all SIDs to remove at user level
$UserSIDs = Get-ChildItem “HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList” | Select-Object -ExpandProperty PSChildName
#These are the registry keys that it will delete.
$Keys = @(
#Remove Background Tasks
“HKCR:\Extensions\ContractId\Windows.BackgroundTasks\PackageId\46928bounde.EclipseManager_2.2.4.51_neutral__a5h4egax66k6y”
“HKCR:\Extensions\ContractId\Windows.BackgroundTasks\PackageId\ActiproSoftwareLLC.562882FEEB491_2.6.18.18_neutral__24pqs290vpjk0”
“HKCR:\Extensions\ContractId\Windows.BackgroundTasks\PackageId\Microsoft.MicrosoftOfficeHub_17.7909.7600.0_x64__8wekyb3d8bbwe”
“HKCR:\Extensions\ContractId\Windows.BackgroundTasks\PackageId\Microsoft.PPIProjection_10.0.15063.0_neutral_neutral_cw5n1h2txyewy”
“HKCR:\Extensions\ContractId\Windows.BackgroundTasks\PackageId\Microsoft.XboxGameCallableUI_1000.15063.0.0_neutral_neutral_cw5n1h2txyewy”
“HKCR:\Extensions\ContractId\Windows.BackgroundTasks\PackageId\Microsoft.XboxGameCallableUI_1000.16299.15.0_neutral_neutral_cw5n1h2txyewy”
#Windows File
“HKCR:\Extensions\ContractId\Windows.File\PackageId\ActiproSoftwareLLC.562882FEEB491_2.6.18.18_neutral__24pqs290vpjk0”
#Registry keys to delete if they aren’t uninstalled by RemoveAppXPackage/RemoveAppXProvisionedPackage
“HKCR:\Extensions\ContractId\Windows.Launch\PackageId\46928bounde.EclipseManager_2.2.4.51_neutral__a5h4egax66k6y”
“HKCR:\Extensions\ContractId\Windows.Launch\PackageId\ActiproSoftwareLLC.562882FEEB491_2.6.18.18_neutral__24pqs290vpjk0”
“HKCR:\Extensions\ContractId\Windows.Launch\PackageId\Microsoft.PPIProjection_10.0.15063.0_neutral_neutral_cw5n1h2txyewy”
“HKCR:\Extensions\ContractId\Windows.Launch\PackageId\Microsoft.XboxGameCallableUI_1000.15063.0.0_neutral_neutral_cw5n1h2txyewy”
“HKCR:\Extensions\ContractId\Windows.Launch\PackageId\Microsoft.XboxGameCallableUI_1000.16299.15.0_neutral_neutral_cw5n1h2txyewy”
#Scheduled Tasks to delete
“HKCR:\Extensions\ContractId\Windows.PreInstalledConfigTask\PackageId\Microsoft.MicrosoftOfficeHub_17.7909.7600.0_x64__8wekyb3d8bbwe”
#Windows Protocol Keys
“HKCR:\Extensions\ContractId\Windows.Protocol\PackageId\ActiproSoftwareLLC.562882FEEB491_2.6.18.18_neutral__24pqs290vpjk0”
“HKCR:\Extensions\ContractId\Windows.Protocol\PackageId\Microsoft.PPIProjection_10.0.15063.0_neutral_neutral_cw5n1h2txyewy”
“HKCR:\Extensions\ContractId\Windows.Protocol\PackageId\Microsoft.XboxGameCallableUI_1000.15063.0.0_neutral_neutral_cw5n1h2txyewy”
“HKCR:\Extensions\ContractId\Windows.Protocol\PackageId\Microsoft.XboxGameCallableUI_1000.16299.15.0_neutral_neutral_cw5n1h2txyewy”
#Windows Share Target
“HKCR:\Extensions\ContractId\Windows.ShareTarget\PackageId\ActiproSoftwareLLC.562882FEEB491_2.6.18.18_neutral__24pqs290vpjk0”
)
#This writes the output of each key it is removing and also removes the keys listed above.
ForEach ($Key in $Keys) {
Write-Host “Removing $Key from registry”
Remove-Item $Key -Recurse
}
#Disables Windows Feedback Experience
Write-Host “Disabling Windows Feedback Experience program”
$Advertising = “HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\AdvertisingInfo”
If (!(Test-Path $Advertising)) {
New-Item $Advertising
}
If (Test-Path $Advertising) {
Set-ItemProperty $Advertising Enabled -Value 0
}
#Stops Cortana from being used as part of your Windows Search Function
Write-Host “Stopping Cortana from being used as part of your Windows Search Function”
$Search = “HKLM:\SOFTWARE\Policies\Microsoft\Windows\Windows Search”
If (!(Test-Path $Search)) {
New-Item $Search
}
If (Test-Path $Search) {
Set-ItemProperty $Search AllowCortana -Value 0
}
#Disables Web Search in Start Menu
Write-Host “Disabling Bing Search in Start Menu”
$WebSearch = “HKLM:\SOFTWARE\Policies\Microsoft\Windows\Windows Search”
If (!(Test-Path $WebSearch)) {
New-Item $WebSearch
}
Set-ItemProperty $WebSearch DisableWebSearch -Value 1
##Loop through all user SIDs in the registry and disable Bing Search
foreach ($sid in $UserSIDs) {
$WebSearch = “HKU:\$sid\SOFTWARE\Microsoft\Windows\CurrentVersion\Search”
If (!(Test-Path $WebSearch)) {
New-Item $WebSearch
}
Set-ItemProperty $WebSearch BingSearchEnabled -Value 0
}
Set-ItemProperty “HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Search” BingSearchEnabled -Value 0
#Stops the Windows Feedback Experience from sending anonymous data
Write-Host “Stopping the Windows Feedback Experience program”
$Period = “HKCU:\Software\Microsoft\Siuf\Rules”
If (!(Test-Path $Period)) {
New-Item $Period
}
Set-ItemProperty $Period PeriodInNanoSeconds -Value 0
##Loop and do the same
foreach ($sid in $UserSIDs) {
$Period = “HKU:\$sid\Software\Microsoft\Siuf\Rules”
If (!(Test-Path $Period)) {
New-Item $Period
}
Set-ItemProperty $Period PeriodInNanoSeconds -Value 0
}
#Prevents bloatware applications from returning and removes Start Menu suggestions
Write-Host “Adding Registry key to prevent bloatware apps from returning”
$registryPath = “HKLM:\SOFTWARE\Policies\Microsoft\Windows\CloudContent”
$registryOEM = “HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager”
If (!(Test-Path $registryPath)) {
New-Item $registryPath
}
Set-ItemProperty $registryPath DisableWindowsConsumerFeatures -Value 1
If (!(Test-Path $registryOEM)) {
New-Item $registryOEM
}
Set-ItemProperty $registryOEM ContentDeliveryAllowed -Value 0
Set-ItemProperty $registryOEM OemPreInstalledAppsEnabled -Value 0
Set-ItemProperty $registryOEM PreInstalledAppsEnabled -Value 0
Set-ItemProperty $registryOEM PreInstalledAppsEverEnabled -Value 0
Set-ItemProperty $registryOEM SilentInstalledAppsEnabled -Value 0
Set-ItemProperty $registryOEM SystemPaneSuggestionsEnabled -Value 0
##Loop through users and do the same
foreach ($sid in $UserSIDs) {
$registryOEM = “HKU:\$sid\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager”
If (!(Test-Path $registryOEM)) {
New-Item $registryOEM
}
Set-ItemProperty $registryOEM ContentDeliveryAllowed -Value 0
Set-ItemProperty $registryOEM OemPreInstalledAppsEnabled -Value 0
Set-ItemProperty $registryOEM PreInstalledAppsEnabled -Value 0
Set-ItemProperty $registryOEM PreInstalledAppsEverEnabled -Value 0
Set-ItemProperty $registryOEM SilentInstalledAppsEnabled -Value 0
Set-ItemProperty $registryOEM SystemPaneSuggestionsEnabled -Value 0
}
#Preping mixed Reality Portal for removal
#Write-Host “Setting Mixed Reality Portal value to 0 so that you can uninstall it in Settings”
#$Holo = “HKCU:\Software\Microsoft\Windows\CurrentVersion\Holographic”
#If (Test-Path $Holo) {
# Set-ItemProperty $Holo FirstRunSucceeded -Value 0
# }
##Loop through users and do the same
# foreach ($sid in $UserSIDs) {
# $Holo = “HKU:\$sid\Software\Microsoft\Windows\CurrentVersion\Holographic”
# If (Test-Path $Holo) {
# Set-ItemProperty $Holo FirstRunSucceeded -Value 0
# }
# }
#Disables Wi-fi Sense
Write-Host “Disabling Wi-Fi Sense”
$WifiSense1 = “HKLM:\SOFTWARE\Microsoft\PolicyManager\default\WiFi\AllowWiFiHotSpotReporting”
$WifiSense2 = “HKLM:\SOFTWARE\Microsoft\PolicyManager\default\WiFi\AllowAutoConnectToWiFiSenseHotspots”
$WifiSense3 = “HKLM:\SOFTWARE\Microsoft\WcmSvc\wifinetworkmanager\config”
If (!(Test-Path $WifiSense1)) {
New-Item $WifiSense1
}
Set-ItemProperty $WifiSense1 Value -Value 0
If (!(Test-Path $WifiSense2)) {
New-Item $WifiSense2
}
Set-ItemProperty $WifiSense2 Value -Value 0
Set-ItemProperty $WifiSense3 AutoConnectAllowedOEM -Value 0
#Disables live tiles
Write-Host “Disabling live tiles”
$Live = “HKCU:\SOFTWARE\Policies\Microsoft\Windows\CurrentVersion\PushNotifications”
If (!(Test-Path $Live)) {
New-Item $Live
}
Set-ItemProperty $Live NoTileApplicationNotification -Value 1
##Loop through users and do the same
foreach ($sid in $UserSIDs) {
$Live = “HKU:\$sid\SOFTWARE\Policies\Microsoft\Windows\CurrentVersion\PushNotifications”
If (!(Test-Path $Live)) {
New-Item $Live
}
Set-ItemProperty $Live NoTileApplicationNotification -Value 1
}
#Turns off Data Collection via the AllowTelemtry key by changing it to 0
# This is needed for Intune reporting to work, uncomment if using via other method
#Write-Host “Turning off Data Collection”
#$DataCollection1 = “HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\DataCollection”
#$DataCollection2 = “HKLM:\SOFTWARE\Policies\Microsoft\Windows\DataCollection”
#$DataCollection3 = “HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Policies\DataCollection”
#If (Test-Path $DataCollection1) {
# Set-ItemProperty $DataCollection1 AllowTelemetry -Value 0
#}
#If (Test-Path $DataCollection2) {
# Set-ItemProperty $DataCollection2 AllowTelemetry -Value 0
#}
#If (Test-Path $DataCollection3) {
# Set-ItemProperty $DataCollection3 AllowTelemetry -Value 0
#}
###Enable location tracking for “find my device”, uncomment if you don’t need it
#Disabling Location Tracking
#Write-Host “Disabling Location Tracking”
#$SensorState = “HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Sensor\Overrides\{BFA794E4-F964-4FDB-90F6-51056BFE4B44}”
#$LocationConfig = “HKLM:\SYSTEM\CurrentControlSet\Services\lfsvc\Service\Configuration”
#If (!(Test-Path $SensorState)) {
# New-Item $SensorState
#}
#Set-ItemProperty $SensorState SensorPermissionState -Value 0
#If (!(Test-Path $LocationConfig)) {
# New-Item $LocationConfig
#}
#Set-ItemProperty $LocationConfig Status -Value 0
#Disables People icon on Taskbar
Write-Host “Disabling People icon on Taskbar”
$People = ‘HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\People’
If (Test-Path $People) {
Set-ItemProperty $People -Name PeopleBand -Value 0
}
##Loop through users and do the same
foreach ($sid in $UserSIDs) {
$People = “HKU:\$sid\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\People”
If (Test-Path $People) {
Set-ItemProperty $People -Name PeopleBand -Value 0
}
}
Write-Host “Disabling Cortana”
$Cortana1 = “HKCU:\SOFTWARE\Microsoft\Personalization\Settings”
$Cortana2 = “HKCU:\SOFTWARE\Microsoft\InputPersonalization”
$Cortana3 = “HKCU:\SOFTWARE\Microsoft\InputPersonalization\TrainedDataStore”
If (!(Test-Path $Cortana1)) {
New-Item $Cortana1
}
Set-ItemProperty $Cortana1 AcceptedPrivacyPolicy -Value 0
If (!(Test-Path $Cortana2)) {
New-Item $Cortana2
}
Set-ItemProperty $Cortana2 RestrictImplicitTextCollection -Value 1
Set-ItemProperty $Cortana2 RestrictImplicitInkCollection -Value 1
If (!(Test-Path $Cortana3)) {
New-Item $Cortana3
}
Set-ItemProperty $Cortana3 HarvestContacts -Value 0
##Loop through users and do the same
foreach ($sid in $UserSIDs) {
$Cortana1 = “HKU:\$sid\SOFTWARE\Microsoft\Personalization\Settings”
$Cortana2 = “HKU:\$sid\SOFTWARE\Microsoft\InputPersonalization”
$Cortana3 = “HKU:\$sid\SOFTWARE\Microsoft\InputPersonalization\TrainedDataStore”
If (!(Test-Path $Cortana1)) {
New-Item $Cortana1
}
Set-ItemProperty $Cortana1 AcceptedPrivacyPolicy -Value 0
If (!(Test-Path $Cortana2)) {
New-Item $Cortana2
}
Set-ItemProperty $Cortana2 RestrictImplicitTextCollection -Value 1
Set-ItemProperty $Cortana2 RestrictImplicitInkCollection -Value 1
If (!(Test-Path $Cortana3)) {
New-Item $Cortana3
}
Set-ItemProperty $Cortana3 HarvestContacts -Value 0
}
#Removes 3D Objects from the ‘My Computer’ submenu in explorer
Write-Host “Removing 3D Objects from explorer ‘My Computer’ submenu”
$Objects32 = “HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{0DB7E03F-FC29-4DC6-9020-FF41B59E513A}”
$Objects64 = “HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{0DB7E03F-FC29-4DC6-9020-FF41B59E513A}”
If (Test-Path $Objects32) {
Remove-Item $Objects32 -Recurse
}
If (Test-Path $Objects64) {
Remove-Item $Objects64 -Recurse
}
##Removes the Microsoft Feeds from displaying
$registryPath = “HKLM:\SOFTWARE\Policies\Microsoft\Windows\Windows Feeds”
$Name = “EnableFeeds”
$value = “0”
if (!(Test-Path $registryPath)) {
New-Item -Path $registryPath -Force | Out-Null
New-ItemProperty -Path $registryPath -Name $name -Value $value -PropertyType DWORD -Force | Out-Null
}
else {
New-ItemProperty -Path $registryPath -Name $name -Value $value -PropertyType DWORD -Force | Out-Null
}
############################################################################################################
# Remove Scheduled Tasks #
# #
############################################################################################################
#Disables scheduled tasks that are considered unnecessary
Write-Host “Disabling scheduled tasks”
$task1 = Get-ScheduledTask -TaskName XblGameSaveTaskLogon -ErrorAction SilentlyContinue
if ($null -ne $task1) {
Get-ScheduledTask XblGameSaveTaskLogon | Disable-ScheduledTask -ErrorAction SilentlyContinue
}
$task2 = Get-ScheduledTask -TaskName XblGameSaveTask -ErrorAction SilentlyContinue
if ($null -ne $task2) {
Get-ScheduledTask XblGameSaveTask | Disable-ScheduledTask -ErrorAction SilentlyContinue
}
$task3 = Get-ScheduledTask -TaskName Consolidator -ErrorAction SilentlyContinue
if ($null -ne $task3) {
Get-ScheduledTask Consolidator | Disable-ScheduledTask -ErrorAction SilentlyContinue
}
$task4 = Get-ScheduledTask -TaskName UsbCeip -ErrorAction SilentlyContinue
if ($null -ne $task4) {
Get-ScheduledTask UsbCeip | Disable-ScheduledTask -ErrorAction SilentlyContinue
}
$task5 = Get-ScheduledTask -TaskName DmClient -ErrorAction SilentlyContinue
if ($null -ne $task5) {
Get-ScheduledTask DmClient | Disable-ScheduledTask -ErrorAction SilentlyContinue
}
$task6 = Get-ScheduledTask -TaskName DmClientOnScenarioDownload -ErrorAction SilentlyContinue
if ($null -ne $task6) {
Get-ScheduledTask DmClientOnScenarioDownload | Disable-ScheduledTask -ErrorAction SilentlyContinue
}
############################################################################################################
# Disable Services #
# #
############################################################################################################
##Write-Host “Stopping and disabling Diagnostics Tracking Service”
#Disabling the Diagnostics Tracking Service
##Stop-Service “DiagTrack”
##Set-Service “DiagTrack” -StartupType Disabled
############################################################################################################
# Windows 11 Specific #
# #
############################################################################################################
#Windows 11 Customisations
write-host “Removing Windows 11 Customisations”
#Remove XBox Game Bar
Get-AppxPackage -allusers Microsoft.XboxGamingOverlay | Remove-AppxPackage
write-host “Removed Xbox Gaming Overlay”
Get-AppxPackage -allusers Microsoft.XboxGameCallableUI | Remove-AppxPackage
write-host “Removed Xbox Game Callable UI”
#Remove Cortana
Get-AppxPackage -allusers Microsoft.549981C3F5F10 | Remove-AppxPackage
write-host “Removed Cortana”
#Remove GetStarted
Get-AppxPackage -allusers *getstarted* | Remove-AppxPackage
write-host “Removed Get Started”
#Remove Parental Controls
Get-AppxPackage -allusers Microsoft.Windows.ParentalControls | Remove-AppxPackage
write-host “Removed Parental Controls”
#Remove Teams Chat
$MSTeams = “MicrosoftTeams”
$WinPackage = Get-AppxPackage -allusers | Where-Object {$_.Name -eq $MSTeams}
$ProvisionedPackage = Get-AppxProvisionedPackage -Online | Where-Object { $_.DisplayName -eq $WinPackage }
If ($null -ne $WinPackage)
{
Remove-AppxPackage -Package $WinPackage.PackageFullName
}
If ($null -ne $ProvisionedPackage)
{
Remove-AppxProvisionedPackage -online -Packagename $ProvisionedPackage.Packagename
}
##Tweak reg permissions
invoke-webrequest -uri “https://github.com/andrew-s-taylor/public/raw/main/De-Bloat/SetACL.exe” -outfile “C:\Windows\Temp\SetACL.exe”
C:\Windows\Temp\SetACL.exe -on “HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Communications” -ot reg -actn setowner -ownr “n:$everyone”
C:\Windows\Temp\SetACL.exe -on “HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Communications” -ot reg -actn ace -ace “n:$everyone;p:full”
##Stop it coming back
$registryPath = “HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Communications”
If (!(Test-Path $registryPath)) {
New-Item $registryPath
}
Set-ItemProperty $registryPath ConfigureChatAutoInstall -Value 0
##Unpin it
$registryPath = “HKLM:\SOFTWARE\Policies\Microsoft\Windows\Windows Chat”
If (!(Test-Path $registryPath)) {
New-Item $registryPath
}
Set-ItemProperty $registryPath “ChatIcon” -Value 2
write-host “Removed Teams Chat”
############################################################################################################
# Windows Backup App #
# #
############################################################################################################
$version = Get-WMIObject win32_operatingsystem | Select-Object Caption
if ($version.Caption -like “*Windows 10*”) {
write-host “Removing Windows Backup”
$filepath = “C:\Windows\SystemApps\MicrosoftWindows.Client.CBS_cw5n1h2txyewy\WindowsBackup\Assets”
if (Test-Path $filepath) {
Remove-WindowsPackage -Online -PackageName “Microsoft-Windows-UserExperience-Desktop-Package~31bf3856ad364e35~amd64~~10.0.19041.3393”
}
write-host “Removed”
}
############################################################################################################
# Clear Start Menu #
# #
############################################################################################################
write-host “Clearing Start Menu”
#Delete layout file if it already exists
##Check windows version
$version = Get-WMIObject win32_operatingsystem | Select-Object Caption
if ($version.Caption -like “*Windows 10*”) {
write-host “Windows 10 Detected”
write-host “Removing Current Layout”
If(Test-Path C:\Windows\StartLayout.xml)
{
Remove-Item C:\Windows\StartLayout.xml
}
write-host “Creating Default Layout”
#Creates the blank layout file
Write-Output “” >> C:\Windows\StartLayout.xml
Write-Output ” ” >> C:\Windows\StartLayout.xml
Write-Output ” ” >> C:\Windows\StartLayout.xml
Write-Output ” ” >> C:\Windows\StartLayout.xml
Write-Output ” ” >> C:\Windows\StartLayout.xml
Write-Output ” ” >> C:\Windows\StartLayout.xml
Write-Output ” ” >> C:\Windows\StartLayout.xml
Write-Output “” >> C:\Windows\StartLayout.xml
}
if ($version.Caption -like “*Windows 11*”) {
write-host “Windows 11 Detected”
write-host “Removing Current Layout”
If(Test-Path “C:\Users\Default\AppData\Local\Microsoft\Windows\Shell\LayoutModification.xml”)
{
Remove-Item “C:\Users\Default\AppData\Local\Microsoft\Windows\Shell\LayoutModification.xml”
}
$blankjson = @’
{
“pinnedList”: [
{ “desktopAppId”: “MSEdge” },
{ “packagedAppId”: “Microsoft.WindowsStore_8wekyb3d8bbwe!App” },
{ “packagedAppId”: “desktopAppId”:”Microsoft.Windows.Explorer” }
]
}
‘@
$blankjson | Out-File “C:\Users\Default\AppData\Local\Microsoft\Windows\Shell\LayoutModification.xml” -Encoding utf8 -Force
}
############################################################################################################
# Remove Xbox Gaming #
# #
############################################################################################################
New-ItemProperty -Path “HKLM:\System\CurrentControlSet\Services\xbgm” -Name “Start” -PropertyType DWORD -Value 4 -Force
Set-Service -Name XblAuthManager -StartupType Disabled
Set-Service -Name XblGameSave -StartupType Disabled
Set-Service -Name XboxGipSvc -StartupType Disabled
Set-Service -Name XboxNetApiSvc -StartupType Disabled
$task = Get-ScheduledTask -TaskName “Microsoft\XblGameSave\XblGameSaveTask” -ErrorAction SilentlyContinue
if ($null -ne $task) {
Set-ScheduledTask -TaskPath $task.TaskPath -Enabled $false
}
##Check if GamePresenceWriter.exe exists
if (Test-Path “$env:WinDir\System32\GameBarPresenceWriter.exe”) {
write-host “GamePresenceWriter.exe exists”
C:\Windows\Temp\SetACL.exe -on “$env:WinDir\System32\GameBarPresenceWriter.exe” -ot file -actn setowner -ownr “n:$everyone”
C:\Windows\Temp\SetACL.exe -on “$env:WinDir\System32\GameBarPresenceWriter.exe” -ot file -actn ace -ace “n:$everyone;p:full”
#Take-Ownership -Path “$env:WinDir\System32\GameBarPresenceWriter.exe”
$NewAcl = Get-Acl -Path “$env:WinDir\System32\GameBarPresenceWriter.exe”
# Set properties
$identity = “$builtin\Administrators”
$fileSystemRights = “FullControl”
$type = “Allow”
# Create new rule
$fileSystemAccessRuleArgumentList = $identity, $fileSystemRights, $type
$fileSystemAccessRule = New-Object -TypeName System.Security.AccessControl.FileSystemAccessRule -ArgumentList $fileSystemAccessRuleArgumentList
# Apply new rule
$NewAcl.SetAccessRule($fileSystemAccessRule)
Set-Acl -Path “$env:WinDir\System32\GameBarPresenceWriter.exe” -AclObject $NewAcl
Stop-Process -Name “GameBarPresenceWriter.exe” -Force
Remove-Item “$env:WinDir\System32\GameBarPresenceWriter.exe” -Force -Confirm:$false
}
else {
write-host “GamePresenceWriter.exe does not exist”
}
New-ItemProperty -Path “HKLM:\Software\Policies\Microsoft\Windows\GameDVR” -Name “AllowgameDVR” -PropertyType DWORD -Value 0 -Force
New-ItemProperty -Path “HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer” -Name “SettingsPageVisibility” -PropertyType String -Value “hide:gaming-gamebar;gaming-gamedvr;gaming-broadcasting;gaming-gamemode;gaming-xboxnetworking” -Force
Remove-Item C:\Windows\Temp\SetACL.exe -recurse
############################################################################################################
# Disable Edge Surf Game #
# #
############################################################################################################
$surf = “HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Edge”
If (!(Test-Path $surf)) {
New-Item $surf
}
New-ItemProperty -Path $surf -Name ‘AllowSurfGame’ -Value 0 -PropertyType DWord
############################################################################################################
# Remove Manufacturer Bloat #
# #
############################################################################################################
##Check Manufacturer
write-host “Detecting Manufacturer”
$details = Get-CimInstance -ClassName Win32_ComputerSystem
$manufacturer = $details.Manufacturer
if ($manufacturer -like “*HP*”) {
Write-Host “HP detected”
#Remove HP bloat
##HP Specific
$UninstallPrograms = @(
“HP Client Security Manager”
“HP Notifications”
“HP Security Update Service”
“HP System Default Settings”
“HP Wolf Security”
“HP Wolf Security Application Support for Sure Sense”
“HP Wolf Security Application Support for Windows”
“AD2F1837.HPPCHardwareDiagnosticsWindows”
“AD2F1837.HPPowerManager”
“AD2F1837.HPPrivacySettings”
“AD2F1837.HPQuickDrop”
“AD2F1837.HPSupportAssistant”
“AD2F1837.HPSystemInformation”
“AD2F1837.myHP”
“RealtekSemiconductorCorp.HPAudioControl”,
“HP Sure Recover”,
“HP Sure Run Module”
)
$HPidentifier = “AD2F1837”
$InstalledPackages = Get-AppxPackage -AllUsers | Where-Object {($UninstallPackages -contains $_.Name) -or ($_.Name -match “^$HPidentifier”)}
$ProvisionedPackages = Get-AppxProvisionedPackage -Online | Where-Object {($UninstallPackages -contains $_.DisplayName) -or ($_.DisplayName -match “^$HPidentifier”)}
$InstalledPrograms = Get-Package | Where-Object {$UninstallPrograms -contains $_.Name}
# Remove provisioned packages first
ForEach ($ProvPackage in $ProvisionedPackages) {
Write-Host -Object “Attempting to remove provisioned package: [$($ProvPackage.DisplayName)]…”
Try {
$Null = Remove-AppxProvisionedPackage -PackageName $ProvPackage.PackageName -Online -ErrorAction Stop
Write-Host -Object “Successfully removed provisioned package: [$($ProvPackage.DisplayName)]”
}
Catch {Write-Warning -Message “Failed to remove provisioned package: [$($ProvPackage.DisplayName)]”}
}
# Remove appx packages
ForEach ($AppxPackage in $InstalledPackages) {
Write-Host -Object “Attempting to remove Appx package: [$($AppxPackage.Name)]…”
Try {
$Null = Remove-AppxPackage -Package $AppxPackage.PackageFullName -AllUsers -ErrorAction Stop
Write-Host -Object “Successfully removed Appx package: [$($AppxPackage.Name)]”
}
Catch {Write-Warning -Message “Failed to remove Appx package: [$($AppxPackage.Name)]”}
}
# Remove installed programs
$InstalledPrograms | ForEach-Object {
Write-Host -Object “Attempting to uninstall: [$($_.Name)]…”
Try {
$Null = $_ | Uninstall-Package -AllVersions -Force -ErrorAction Stop
Write-Host -Object “Successfully uninstalled: [$($_.Name)]”
}
Catch {Write-Warning -Message “Failed to uninstall: [$($_.Name)]”}
}
#Remove HP Documentation
$A = Start-Process -FilePath “C:\Program Files\HP\Documentation\Doc_uninstall.cmd” -Wait -passthru -NoNewWindow;$a.ExitCode
##Remove Standard HP apps via msiexec
$InstalledPrograms | ForEach-Object {
$appname = $_.Name
Write-Host -Object “Attempting to uninstall: [$($_.Name)]…”
Try {
$Prod = Get-WMIObject -Classname Win32_Product | Where-Object Name -Match $appname
$Prod.UnInstall()
Write-Host -Object “Successfully uninstalled: [$($_.Name)]”
}
Catch {Write-Warning -Message “Failed to uninstall: [$($_.Name)]”}
}
##Remove HP Connect Optimizer
invoke-webrequest -uri “https://raw.githubusercontent.com/andrew-s-taylor/public/main/De-Bloat/HPConnOpt.iss” -outfile “C:\Windows\Temp\HPConnOpt.iss”
&’C:\Program Files (x86)\InstallShield Installation Information\{6468C4A5-E47E-405F-B675-A70A70983EA6}\setup.exe’ @(‘-s’, ‘-f1C:\Windows\Temp\HPConnOpt.iss’)
Write-Host “Removed HP bloat”
}
if ($manufacturer -like “*Dell*”) {
Write-Host “Dell detected”
#Remove Dell bloat
##Dell
$UninstallPrograms = @(
“Dell Optimizer”
“Dell Power Manager”
“DellOptimizerUI”
“Dell SupportAssist”
“Dell Optimizer Service”
“DellInc.PartnerPromo”
“DellInc.DellOptimizer”
)
$WhitelistedApps = @(
“WavesAudio.MaxxAudioProforDell2019”
“Dell – Extension*”
“Dell, Inc. – Firmware*”
“DellInc.DellCommandUpdate”
“Dell.CommandUpdate”
“Dell SupportAssist OS Recovery”
)
$InstalledPackages = Get-AppxPackage -AllUsers | Where-Object {(($_.Name -in $UninstallPrograms) -or ($_.Name -like “*Dell*”)) -and ($_.Name -NotMatch $WhitelistedApps)}
Write-Host $UninstallPrograms
$ProvisionedPackages = Get-AppxProvisionedPackage -Online | Where-Object {(($_.Name -in $UninstallPrograms) -or ($_.Name -like “*Dell*”)) -and ($_.Name -NotMatch $WhitelistedApps)}
Write-host $ProvisionedPackages
$InstalledPrograms = Get-Package | Where-Object {(($_.Name -in $UninstallPrograms) -or ($_.Name -like “*Dell*”)) -and ($_.Name -NotMatch $WhitelistedApps)}
Write-host $InstalledPrograms
# Remove provisioned packages first
ForEach ($ProvPackage in $ProvisionedPackages) {
Write-Host -Object “Attempting to remove provisioned package: [$($ProvPackage.DisplayName)]…”
Try {
$Null = Remove-AppxProvisionedPackage -PackageName $ProvPackage.PackageName -Online -ErrorAction Stop
Write-Host -Object “Successfully removed provisioned package: [$($ProvPackage.DisplayName)]”
}
Catch {Write-Warning -Message “Failed to remove provisioned package: [$($ProvPackage.DisplayName)]”}
}
# Remove appx packages
ForEach ($AppxPackage in $InstalledPackages) {
Write-Host -Object “Attempting to remove Appx package: [$($AppxPackage.Name)]…”
Try {
$Null = Remove-AppxPackage -Package $AppxPackage.PackageFullName -AllUsers -ErrorAction Stop
Write-Host -Object “Successfully removed Appx package: [$($AppxPackage.Name)]”
}
Catch {Write-Warning -Message “Failed to remove Appx package: [$($AppxPackage.Name)]”}
}
# Remove any bundled packages
ForEach ($AppxPackage in $InstalledPackages) {
Write-Host -Object “Attempting to remove Appx package: [$($AppxPackage.Name)]…”
Try {
$null = Get-AppxPackage -AllUsers -PackageTypeFilter Main, Bundle, Resource -Name $AppxPackage.Name | Remove-AppxPackage -AllUsers
Write-Host -Object “Successfully removed Appx package: [$($AppxPackage.Name)]”
}
Catch {Write-Warning -Message “Failed to remove Appx package: [$($AppxPackage.Name)]”}
}
# Remove installed programs
$InstalledPrograms | ForEach-Object {
Write-Host -Object “Attempting to uninstall: [$($_.Name)]…”
Try {
$Null = $_ | Uninstall-Package -AllVersions -Force -ErrorAction Stop
Write-Host -Object “Successfully uninstalled: [$($_.Name)]”
}
Catch {Write-Warning -Message “Failed to uninstall: [$($_.Name)]”}
}
}
if ($manufacturer -like “Lenovo”) {
Write-Host “Lenovo detected”
#Remove HP bloat
##Lenovo Specific
# Function to uninstall applications with .exe uninstall strings
function UninstallApp {
param (
[string]$appName
)
# Get a list of installed applications from Programs and Features
$installedApps = Get-ItemProperty HKLM:\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\*,
HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall\* |
Where-Object { $_.DisplayName -like “*$appName*” }
# Loop through the list of installed applications and uninstall them
foreach ($app in $installedApps) {
$uninstallString = $app.UninstallString
$displayName = $app.DisplayName
Write-Host “Uninstalling: $displayName”
Start-Process $uninstallString -ArgumentList “/VERYSILENT” -Wait
Write-Host “Uninstalled: $displayName” -ForegroundColor Green
}
}
##Stop Running Processes
$processnames = @(
“SmartAppearanceSVC.exe”
“UDClientService.exe”
“ModuleCoreService.exe”
“ProtectedModuleHost.exe”
“*lenovo*”
“FaceBeautify.exe”
“McCSPServiceHost.exe”
“mcapexe.exe”
“MfeAVSvc.exe”
“mcshield.exe”
“Ammbkproc.exe”
“AIMeetingManager.exe”
“DADUpdater.exe”
)
foreach ($process in $processnames) {
write-host “Stopping Process $process”
Get-Process -Name $process | Stop-Process -Force
write-host “Process $process Stopped”
}
$UninstallPrograms = @(
“E046963F.AIMeetingManager”
“E0469640.SmartAppearance”
“MirametrixInc.GlancebyMirametrix”
“E046963F.LenovoCompanion”
“E0469640.LenovoUtility”
)
$InstalledPackages = Get-AppxPackage -AllUsers | Where-Object {(($_.Name -in $UninstallPrograms))}
$ProvisionedPackages = Get-AppxProvisionedPackage -Online | Where-Object {(($_.Name -in $UninstallPrograms))}
$InstalledPrograms = Get-Package | Where-Object {(($_.Name -in $UninstallPrograms))}
# Remove provisioned packages first
ForEach ($ProvPackage in $ProvisionedPackages) {
Write-Host -Object “Attempting to remove provisioned package: [$($ProvPackage.DisplayName)]…”
Try {
$Null = Remove-AppxProvisionedPackage -PackageName $ProvPackage.PackageName -Online -ErrorAction Stop
Write-Host -Object “Successfully removed provisioned package: [$($ProvPackage.DisplayName)]”
}
Catch {Write-Warning -Message “Failed to remove provisioned package: [$($ProvPackage.DisplayName)]”}
}
# Remove appx packages
ForEach ($AppxPackage in $InstalledPackages) {
Write-Host -Object “Attempting to remove Appx package: [$($AppxPackage.Name)]…”
Try {
$Null = Remove-AppxPackage -Package $AppxPackage.PackageFullName -AllUsers -ErrorAction Stop
Write-Host -Object “Successfully removed Appx package: [$($AppxPackage.Name)]”
}
Catch {Write-Warning -Message “Failed to remove Appx package: [$($AppxPackage.Name)]”}
}
# Remove any bundled packages
ForEach ($AppxPackage in $InstalledPackages) {
Write-Host -Object “Attempting to remove Appx package: [$($AppxPackage.Name)]…”
Try {
$null = Get-AppxPackage -AllUsers -PackageTypeFilter Main, Bundle, Resource -Name $AppxPackage.Name | Remove-AppxPackage -AllUsers
Write-Host -Object “Successfully removed Appx package: [$($AppxPackage.Name)]”
}
Catch {Write-Warning -Message “Failed to remove Appx package: [$($AppxPackage.Name)]”}
}
# Remove installed programs
$InstalledPrograms | ForEach-Object {
Write-Host -Object “Attempting to uninstall: [$($_.Name)]…”
Try {
$Null = $_ | Uninstall-Package -AllVersions -Force -ErrorAction Stop
Write-Host -Object “Successfully uninstalled: [$($_.Name)]”
}
Catch {Write-Warning -Message “Failed to uninstall: [$($_.Name)]”}
}
# Get Lenovo Vantage service uninstall string to uninstall service
$lvs = Get-ItemProperty “HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\*”, “HKLM:\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\*” | Where-Object DisplayName -eq “Lenovo Vantage Service”
if (!([string]::IsNullOrEmpty($lvs.QuietUninstallString))) {
$uninstall = “cmd /c ” + $lvs.QuietUninstallString
Write-Host $uninstall
Invoke-Expression $uninstall
}
# Uninstall Lenovo Smart
UninstallApp -appName “Lenovo Smart”
# Uninstall Ai Meeting Manager Service
UninstallApp -appName “Ai Meeting Manager”
# Uninstall ImController service
##Check if exists
$path = “c:\windows\system32\ImController.InfInstaller.exe”
if (Test-Path $path) {
Write-Host “ImController.InfInstaller.exe exists”
$uninstall = “cmd /c ” + $path + ” -uninstall”
Write-Host $uninstall
Invoke-Expression $uninstall
}
else {
Write-Host “ImController.InfInstaller.exe does not exist”
}
##Invoke-Expression -Command ‘cmd.exe /c “c:\windows\system32\ImController.InfInstaller.exe” -uninstall’
# Remove vantage associated registry keys
Remove-Item ‘HKLM:\SOFTWARE\Policies\Lenovo\E046963F.LenovoCompanion_k1h2ywk1493x8’ -Recurse -ErrorAction SilentlyContinue
Remove-Item ‘HKLM:\SOFTWARE\Policies\Lenovo\ImController’ -Recurse -ErrorAction SilentlyContinue
Remove-Item ‘HKLM:\SOFTWARE\Policies\Lenovo\Lenovo Vantage’ -Recurse -ErrorAction SilentlyContinue
Remove-Item ‘HKLM:\SOFTWARE\Policies\Lenovo\Commercial Vantage’ -Recurse -ErrorAction SilentlyContinue
# Uninstall AI Meeting Manager Service
$path = ‘C:\Program Files\Lenovo\Ai Meeting Manager Service\unins000.exe’
$params = “/SILENT”
Start-Process -FilePath $path -ArgumentList $params -Wait
# Uninstall Lenovo Vantage
$path = ‘C:\Program Files (x86)\Lenovo\VantageService\3.13.43.0\Uninstall.exe’
$params = ‘/SILENT’
Start-Process -FilePath $path -ArgumentList $params