Removing Bloatware from Windows 10 & 11 via script

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!

542 thoughts on “Removing Bloatware from Windows 10 & 11 via script”

  1. 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?

    Reply
  2. 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

    Reply
    • 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

      Reply
  3. 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

    Reply
  4. 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.

    Reply
  5. 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?

    Reply
    • 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 ๐Ÿ™‚

      Reply
  6. 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?

    Reply
  7. 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! ๐Ÿ˜€

    Reply
      • 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}

        Reply
          • 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?

          • 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.

          • 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)

  8. 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?

    Reply
    • 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

      Reply
  9. 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?

    Reply
    • 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

      Reply
      • 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.

        Reply
  10. 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 ?

    Reply
  11. 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!

    Reply
    • 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

      Reply
      • 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!

        Reply
  12. 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.

    Reply
      • 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.

        Reply
      • 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

        Reply
      • 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

        Reply
  13. 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.

    Reply
    • 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?

      Reply
      • 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

        Reply
  14. 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 ๐Ÿ™‚

    Reply
      • 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

        Reply
      • 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

        Reply
  15. 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.

    Reply
    • 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

      Reply
  16. 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?

    Reply
    • 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

      Reply
  17. 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

    Reply
    • 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

      Reply
      • 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

        Reply
        • 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 ๐Ÿ™‚

          Reply
      • 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 ๐Ÿ™‚

        Reply
  18. 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

    Reply
      • 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?

        Reply
      • 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.

        Reply
        • 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

          Reply
  19. 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”

    Reply
  20. 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.”
    }

    }

    Reply
  21. 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.

    Reply
    • 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

      Reply
      • 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?

        Reply
        • 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”

          Reply
          • 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

  22. 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

    Reply
  23. 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.

    Reply
  24. 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 ?

    Reply
  25. 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?

    Reply
  26. 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
    **********************

    Reply
  27. Hi, can you exclude the Dell Command Update app from being uninstalled? The app is needed for my company’s application requirements.

    Reply
      • 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”‘

        Reply
        • 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

          Reply
  28. 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
    **********************

    Reply
  29. 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.

    Reply
  30. 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?

    Reply
  31. 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?

    Reply
  32. 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.

    Reply
          • ##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 $_}

  33. 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?

    Reply
      • 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”
        }

        }

        Reply
          • 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}

  34. 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.

    Reply
  35. 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 ?

    Reply
  36. 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

    Reply
  37. 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.

    Reply
    • 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

      Reply
  38. 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

    Reply
      • 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

        Reply
          • 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 !!

  39. 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 ?

    Reply
  40. 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
    **********************

    Reply
    • 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?

      Reply
      • 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″

        Reply
        • 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”

          Reply
          • 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.

          • 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 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.

          • I have reset the same machine and tried it again, same error as before. Seams like the ClickToRun are hanging.

          • 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?

          • 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 ๐Ÿ™‚

          • Do you know of a way to start a powershel script that reboots underway, and continues at the next point after reboot? ๐Ÿ™‚

  41. 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!

    Reply
  42. 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.

    Reply
  43. 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 .

    Reply
  44. 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?

    Reply
    • 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

      Reply
  45. 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*”

    Reply
    • 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

      Reply
      • 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%

        Reply
        • 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

          Reply
    • 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

      Reply
      • 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

        Reply
        • 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?

          Reply
          • 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

          • 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

      • 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…

        Reply
          • 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

          • 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

          • 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.

  46. 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

    Reply
  47. 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.

    Reply
  48. 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

    Reply
    • 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

      Reply
      • 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

        Reply
        • 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)

          Reply
          • 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

  49. 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

    Reply
      • 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”

        Reply
        • 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

          Reply
  50. 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

    Reply
    • 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

      Reply
      • 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”

        Reply
  51. 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!

    Reply
      • 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

        Reply
  52. 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.

    Reply
    • 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

      Reply
  53. 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.

    Reply
  54. 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?

    Reply
    • 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

      Reply
  55. 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?

    Reply
    • 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.

      Reply
  56. 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.

    Reply
  57. 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.

    Reply
    • 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

      Reply
      • 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.

        Reply
      • exactly like I suggested? So in the “debloat-intune-script.ps1”

        Something like that?
        invoke-expression -Command $templateFilePath -customwhitelist โ€œApp1, App2, App3โ€ etc.

        Reply
        • 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ย ยป

          Reply
          • Can you try this:

            $arguments = ‘ -customwhitelist โ€œDellInc.DellCommandUpdateโ€, โ€œDell Command | Updateโ€, โ€œDell Command | Update for Windows Universalโ€’

            invoke-expression -Command “$templateFilePath $arguments”

  58. 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.

    Reply
  59. 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”

    Reply
      • 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.

        Reply
  60. 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?

    Reply
  61. 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.

    Reply
  62. 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?

    Reply
  63. 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!

    Reply
    • 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

      Reply
      • 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

        Reply
  64. 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?

    Reply
  65. 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

    Reply
  66. 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.

    Reply
    • 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

      Reply
  67. 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.

    Reply
  68. 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.

    Reply
  69. 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.

    Reply
    • 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

      Reply
      • 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.

        Reply
        • 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.

          Reply
  70. 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?

    Reply
    • 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

      Reply
  71. 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

    Reply
    • 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

      Reply
      • 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?

        Reply
        • 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

          Reply
  72. 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

    Reply
  73. 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?

    Reply
  74. 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.

    Reply
  75. 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?

    Reply
  76. 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

    Reply
  77. 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

    Reply
    • 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

      Reply
  78. 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?

    Reply
  79. 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?

    Reply
    • 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)

      Reply
  80. 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!

    Reply
  81. 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!

    Reply
    • 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

      Reply
  82. 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?

    Reply
  83. 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

    Reply
  84. 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.

    Reply
    • 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.

      Reply
  85. 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)”

    Reply
  86. 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.

    Reply
  87. 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

    Reply
  88. 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.

    Reply
    • 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

      Reply
  89. 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

    Reply
  90. 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

    Reply
  91. 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!

    Reply
    • 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?

      Reply
  92. 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

    Reply
  93. ############################################################################################################
    # 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 -Wait

    ##Uninstall Smart Appearance
    $path = ‘C:\Program Files\Lenovo\Lenovo Smart Appearance Components\unins000.exe’
    $params = ‘/SILENT’
    Start-Process -FilePath $path -ArgumentList $params -Wait

    # Remove Lenovo Now
    Set-Location “c:\program files (x86)\lenovo\lenovowelcome\x86”

    # Update $PSScriptRoot with the new working directory
    $PSScriptRoot = (Get-Item -Path “.\”).FullName
    invoke-expression -command .\uninstall.ps1

    Write-Host “All applications and associated Lenovo components have been uninstalled.” -ForegroundColor Green
    }

    ############################################################################################################
    # Remove Any other installed crap #
    # #
    ############################################################################################################

    #McAfee

    write-host “Detecting McAfee”
    $mcafeeinstalled = “false”
    $InstalledSoftware = Get-ChildItem “HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall”
    foreach($obj in $InstalledSoftware){
    $name = $obj.GetValue(‘DisplayName’)
    if ($name -like “*McAfee*”) {
    $mcafeeinstalled = “true”
    }
    }

    $InstalledSoftware32 = Get-ChildItem “HKLM:\Software\WOW6432NODE\Microsoft\Windows\CurrentVersion\Uninstall”
    foreach($obj32 in $InstalledSoftware32){
    $name32 = $obj32.GetValue(‘DisplayName’)
    if ($name32 -like “*McAfee*”) {
    $mcafeeinstalled = “true”
    }
    }

    if ($mcafeeinstalled -eq “true”) {
    Write-Host “McAfee detected”
    #Remove McAfee bloat
    ##McAfee
    ### Download McAfee Consumer Product Removal Tool ###
    write-host “Downloading McAfee Removal Tool”
    # Download Source
    $URL = ‘https://github.com/andrew-s-taylor/public/raw/main/De-Bloat/mcafeeclean.zip’

    # Set Save Directory
    $destination = ‘C:\ProgramData\Debloat\mcafee.zip’

    #Download the file
    Invoke-WebRequest -Uri $URL -OutFile $destination -Method Get

    Expand-Archive $destination -DestinationPath “C:\ProgramData\Debloat” -Force

    write-host “Removing McAfee”
    # Automate Removal and kill services
    start-process “C:\ProgramData\Debloat\Mccleanup.exe” -ArgumentList “-p StopServices,MFSY,PEF,MXD,CSP,Sustainability,MOCP,MFP,APPSTATS,Auth,EMproxy,FWdiver,HW,MAS,MAT,MBK,MCPR,McProxy,McSvcHost,VUL,MHN,MNA,MOBK,MPFP,MPFPCU,MPS,SHRED,MPSCU,MQC,MQCCU,MSAD,MSHR,MSK,MSKCU,MWL,NMC,RedirSvc,VS,REMEDIATION,MSC,YAP,TRUEKEY,LAM,PCB,Symlink,SafeConnect,MGS,WMIRemover,RESIDUE -v -s”
    write-host “McAfee Removal Tool has been run”

    }

    ##Look for anything else

    ##Make sure Intune hasn’t installed anything so we don’t remove installed apps

    $intunepath = “HKLM:\SOFTWARE\Microsoft\IntuneManagementExtension\Win32Apps”
    $intunecomplete = @(Get-ChildItem $intunepath).count
    if ($intunecomplete -eq 0) {

    ##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”
    )

    $InstalledSoftware = Get-ChildItem “HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall”
    foreach($obj in $InstalledSoftware){
    $name = $obj.GetValue(‘DisplayName’)
    if (($whitelistapps -notcontains $name) -and ($null -ne $obj.GetValue(‘UninstallString’))) {
    $uninstallcommand = $obj.GetValue(‘UninstallString’)
    write-host “Uninstalling $name”
    if ($uninstallcommand -like “*msiexec*”) {
    $splitcommand = $uninstallcommand.Split(“{“)
    $msicode = $splitcommand[1]
    $uninstallapp = “msiexec.exe /X {$msicode /qn”
    start-process “cmd.exe” -ArgumentList “/c $uninstallapp”
    }
    else {
    $splitcommand = $uninstallcommand.Split(“{“)

    $uninstallapp = “$uninstallcommand /S”
    start-process “cmd.exe” -ArgumentList “/c $uninstallapp”
    }
    }

    }

    $InstalledSoftware32 = Get-ChildItem “HKLM:\Software\WOW6432NODE\Microsoft\Windows\CurrentVersion\Uninstall”
    foreach($obj32 in $InstalledSoftware32){
    $name32 = $obj32.GetValue(‘DisplayName’)
    if (($whitelistapps -notcontains $name32) -and ($null -ne $obj32.GetValue(‘UninstallString’))) {
    $uninstallcommand32 = $obj.GetValue(‘UninstallString’)
    write-host “Uninstalling $name”
    if ($uninstallcommand32 -like “*msiexec*”) {
    $splitcommand = $uninstallcommand32.Split(“{“)
    $msicode = $splitcommand[1]
    $uninstallapp = “msiexec.exe /X {$msicode /qn”
    start-process “cmd.exe” -ArgumentList “/c $uninstallapp”
    }
    else {
    $splitcommand = $uninstallcommand32.Split(“{“)

    $uninstallapp = “$uninstallcommand /S”
    start-process “cmd.exe” -ArgumentList “/c $uninstallapp”
    }
    }
    }

    ##Remove Chrome
    $chrome32path = “HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Google Chrome”

    if ($null -ne $chrome32path) {

    $versions = (Get-ItemProperty -path ‘HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Google Chrome’).version
    ForEach ($version in $versions) {
    write-host “Found Chrome version $version”
    $directory = ${env:ProgramFiles(x86)}
    write-host “Removing Chrome”
    Start-Process “$directory\Google\Chrome\Application\$version\Installer\setup.exe” -argumentlist “–uninstall –multi-install –chrome –system-level –force-uninstall”
    }

    }

    $chromepath = “HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Google Chrome”

    if ($null -ne $chromepath) {

    $versions = (Get-ItemProperty -path ‘HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Google Chrome’).version
    ForEach ($version in $versions) {
    write-host “Found Chrome version $version”
    $directory = ${env:ProgramFiles}
    write-host “Removing Chrome”
    Start-Process “$directory\Google\Chrome\Application\$version\Installer\setup.exe” -argumentlist “–uninstall –multi-install –chrome –system-level –force-uninstall”
    }

    }

    }

    write-host “Completed”

    Stop-Transcript

    Reply
  94. Hello Andrews, thank you for the script. I’ve added Dell Command Update to the whitelist, but it still gets uninstalled. I removed the part of the script that updates the script, but my script changes don’t seem to take effect. Do you have any ideas on how to fix this?

    Reply
  95. But that registry is already in there, but it doesnt seem to remove the Commercial Vantage from the add/remove programs list, still a under 1mb app left that can be uninstalled.

    Reply
  96. Andrew, Strong work here. Going to do some testing with this when I get time to read through all the code. Probably go for the removal script VS the auto update as I like seeing what changes between versions. Thanks for sharing.

    Reply
  97. Remove-Item ‘HKLM:\SOFTWARE\Policies\Lenovo\Commercial Vantage’ -Recurse -ErrorAction SilentlyContinue

    This one can you also add so the software to this get uninstalled, it doesnt get removed in the current version.

    All elles Vantage software is removed. By i still have Commercial Vantage installed after running it.

    Reply
  98. Andrew, love your github and time you have taken to share this with everyone. Thank you for that.
    I’m trying to cleanup an existing environment that was not managed very well for many years and I’m not one of the cool kids with intune. Is it possible to deploy this to existing workstations with active users using SCCM or is this strictly for intune?

    Reply
  99. I noticed that with the Diagnostic Tracking service disabled you will lose telemetry data into Intune like Endpoint Analytics, Startup Performance, and Application Reliability.

    I setup another script to re-enable the service versus using a one-off version of your great script.

    Reply
  100. Hi Andrew,

    Thank you for creating this script, sharing it and helping everyone!

    I’m running into issues with HP laptops with “HP Client Security Manager” installed.

    The script stops or is stuck in a loop when attempting to uninstall HP Client Security Manager.

    In the Debloat.log file we don’t have much:
    Detecting Manufacturer
    HP detected
    Attempting to uninstall: [HP Client Security Manager]…
    Successfully uninstalled: [HP Client Security Manager]
    Attempting to uninstall: [HP Client Security Manager]…

    However, when we run it manually in Powershell, we get the following:

    Detecting Manufacturer

    HP detected

    Attempting to uninstall: [HP Client Security Manager]…

    Successfully uninstalled: [HP Client Security Manager]

    Attempting to uninstall: [HP Client Security Manager]…

    WARNING: Failed to uninstall: []

    Attempting to uninstall: [HP Notifications]…

    WARNING: Failed to uninstall: []

    Attempting to uninstall: [HP Sure Recover]…

    WARNING: Failed to uninstall: []

    Attempting to uninstall: [HP System Default Settings]…

    WARNING: Failed to uninstall: []

    Attempting to uninstall: [HP Client Security Manager]…

    __GENUS : 2

    __CLASS : __PARAMETERS

    __SUPERCLASS :

    __DYNASTY : __PARAMETERS

    __RELPATH :

    __PROPERTY_COUNT : 1

    __DERIVATION : {}

    __SERVER :

    __NAMESPACE :

    __PATH :

    ReturnValue : 1618

    PSComputerName :

    Successfully uninstalled: [HP Client Security Manager]

    Attempting to uninstall: [HP Client Security Manager]…

    When we try to uninstall it manually it’s asking to preserve user data and then reboot the PC “The setup must update files or services that cannot be updated while the system is running. If you choose to continue, a reboot will be required to complete the setup.”

    Please let me know if there could be a way to fully uninstall this one with you script.

    Thanks!

    Reply
    • Hi Martin,
      Would you be able to check if there are any additional parameters that can be sent to the application to force an uninstall without a reboot? I can then remove that from the main array and add it as a separate uninstall command (unfortunately I don’t have an HP laptop for testing)

      Reply
  101. Hello, thank you for your awesome script, I really appreciate it.

    I ran this script on a Lenovo Thinkbook 13s with W11 and could not factory reset the computer (via Windows Settings, local reset) afterwards.

    It got fixed after I went to Lenovo’s website and installed some software for Lenovo diagnostics. After a firmware upgrade that was installed by Lenovo System Update, I could once again factory restore.

    Just thought I’d share what I learned, as the ability to factory restore a computer from the Windows Settings might be something that’s worth keeping.

    Reply
  102. Hi Andrew!

    Should this be considered a one time needed script? I’m curious whether I could run this script when we receive the device from the supplier and then rebuilding with our corporate image. Or do we have to rebuild first and then run the script?

    Normally when we receive laptops from suppliers, the bloatware used to go away after rebuild but we are facing a number of devices on which this doesn’t happen after the rebuild so I’m looking into trying out your script for this situation!

    Reply
    • Hi Georgiana,
      Either way will work fine, the only difference is if you run it pre-rebuild, the Windows apps will re-appear. I usually run it during OOBE when building or rebuilding a machine.
      Hope this helps ๐Ÿ™‚

      Reply
  103. Hey first off thank you for this! This is exactly what we need to roll out a bunch of new laptops for our student body! Hoping to understand more how this works. I’ve uploaded the debloat-intune-script.ps1 to InTune. This has created the DeBloat directory in %programdata%, however, as I understand it, it should copy removeBloat.ps1, then start running it to actually remove the bloat. This is not happening in my instance so the rest of the script is failing with the following error basically saying it cannot find the path of the removeBloat.ps1 script. Any assistance would be greatly appreciate! Thanks again!!

    Reply
    • Hi,
      Yes, that is how it should work.
      Do you have any web filtering in place? If you look inside the script it has the location it downloads from so you could try that on a machine to see if there are any errors.
      There are a few other downloads from the repo in the main script as well so if it is filtering or a firewall, it might be worth exempting the whole de-bloat folder in the repo

      Reply
  104. Adding a local whitelist file would be very useful.

    We use ClipChamp to create videos for training, and need to keep reinstalling after the script runs.

    Reply
  105. I am running the script on a Panasonic Toughbook and it is disabling the GPS function. I have commented out all lines pertaining to location but I seem to be missing some, any idea’s?

    Reply
    • It could possibly be diagnostics tracking?
      Line 721:
      Write-Host “Stopping and disabling Diagnostics Tracking Service”
      #Disabling the Diagnostics Tracking Service
      Stop-Service “DiagTrack”
      Set-Service “DiagTrack” -StartupType Disabled

      Nothing else in there which should stop GPS though unless it uses a store app?

      Reply
  106. I am going to give this a go, but wanted to check before i do. I want to run this in autopilot only as a required win32app but I am not sure how to do it to new autopilot devices only. If I create a new app and make it required, logic says that t will deploy to all machines. If i add to the autopilot profile without the required setting, surely it it wonโ€™t execute. Any ideas

    Reply
    • Hi, there isn’t an easy way to target just new devices unless you set a requirements rule that something doesn’t exist (an app in your core apps maybe).
      There shouldn’t be any harm in deploying to existing devices though as it is just removing apps you wouldn’t want on them anyway.

      I tend to deploy as a script rather than an app as that runs earlier in the process and can remove any installed bloat apps like McAfee (it detects if any Win32 apps have been deployed, if it finds one, it skips the removal of installed/non-store apps)

      Reply
  107. Hey, Andrew!

    Thank you for the amazing script. We’ve been banging our heads against the wall for weeks trying to get rid of McAfee for our OOBE/Intune installs.

    I’m sure this has already been addressed, but I didn’t see it anywhere on this page or in the comments.

    We currently have the RemoveBloat.ps1 script running as a PowerShell Script in Intune. You mention the second script in the blog, debloat-intune-script.ps1. Do we run that in addition to the RemoveBloat.ps1, or should it replace it and be the only script we run from Intune under the PowerShell Scripts?

    Thank you again!

    Reply
    • Hi
      Great that you are finding it useful!
      Both ultimately do the same thing, the debloat-intune-script simply downloads the latest version to the host machine and then runs it.
      This gives you the advantage that your machines are always running the latest version without any effort from your side.

      Deploying removebloat directly will work fine, but if you want the latest version you will need to update in Intune which will re-run on all devices (it won’t do any damage, but just worth keeping in mind)

      Hope this helps

      Reply
  108. Yep! I can see the other taskbar icons that I pinned along with the start menu group I created. So profile definitely applying and according to the debloat logs, it’s deleting the default layout and applying the blank layout, so not sure where the other default groups are coming from.

    Reply
  109. And if I take out LayoutCustomizationRestrictionType=”OnlySpecifiedGroups”, it’ll replace it but users can’t edit the start menu layout anymore? I was hoping your script would clear it so that I can use ‘add’ to a blank layout rather than have to replace it and that other users can’t alter it anymore.

    Reply
    • I’ve just tested it on a Win 10 machine and with a custom layout (which users can customise), I don’t get those two groups.
      Is your custom layout applying ok onto the device?

      Reply
  110. Hey Andrew!

    Thank you for such a quick reply. I cannot see any content after your XML: comment

    This is my current custom layout:

    Thank you,
    Jazzy.

    Reply
  111. Hey Andrew!

    Thank you for this script, it’s absolutely excellent.

    I am having some issues with the start menu layout. According to the log, it clears the start menu:
    Clearing Start Menu
    Windows 10 Detected
    Removing Current Layout
    Creating Default Layout

    I am pushing a customised layout for start menu and taskbar from Intune with an XML file. Which does push successfully. However, I can see 2 start menu tiles not added by me, a group called ‘Productivity’ with the photos tile in it and ‘Explore’ with the Microsoft store tile in it.

    The debloat script is pushed to the autopilot device group and script is ran in 64 bit PowerShell Host. I am not entirely sure where t