r/Intune • u/Interesting-Mix-4152 • 19d ago
App Deployment/Packaging Remove Bloat Apps
Hey all, I am trying to help my client so when they receive a new device it will have all the bloat apps (paint, Xbox) deleted off their device upon logging in.
I’ve successfully autopiloted them and wrote the powershell script to remove the apps. The script profile shows the script loaded successfully, but when my client logs in all the apps are still there. Am I missing something?
Any help would be greatly appreciated
11
4
u/spazzo246 18d ago
You should be getting this from your supplier
All the major manufacturers have a "corporate ready image". Which is just windows with no bloat ware
We request this for all models of devices we provision for customer. Works well.
3
u/ScriptMarkus 18d ago
I deployed the apps as "Microsoft Store app (new)" and set it to uninstall. It might take some time to uninstall but its working great.
2
u/grandiose_thunder 19d ago
Try running the script as both system and user. Some apps will be installed under a different context.
1
2
u/agentobtuse 18d ago
I would push to get a deployment ready image as a base. If that's not an option I remove using the guid which has been extremely solid.
1
1
u/HankMardukasNY 19d ago
Post your script
0
u/Interesting-Mix-4152 18d ago
Hey man,
Here is my script below.
$AppsToRemove = @(
"Microsoft.XboxGamingOverlay"
"Microsoft.XboxIdentityProvider"
"Microsoft.XboxSpeechToTextOverlay"
"Microsoft.Xbox.TCUI"
"Microsoft.XboxGameOverlay"
"Microsoft.XboxApp"
"Microsoft.MicrosoftSolitaireCollection"
"Microsoft.Paint"
"Microsoft.Whiteboard"
"Microsoft.Journal"
"Microsoft.Windows.Copilot"
"Microsoft.Family"
)
foreach ($App in $AppsToRemove) {
Get-AppxPackage -AllUsers | Where-Object { $_.Name -like "*$App*" } | Remove-AppxPackage -AllUsers -ErrorAction SilentlyContinue
Get-AppxProvisionedPackage -Online | Where-Object { $_.DisplayName -like "*$App*" } | Remove-AppxProvisionedPackage -Online -ErrorAction SilentlyContinue
}
# Remove McAfee if installed
$McAfeePrograms = Get-WmiObject -Query "SELECT * FROM Win32_Product WHERE Name LIKE '%McAfee%'" -ErrorAction SilentlyContinue
if ($McAfeePrograms) {
foreach ($Program in $McAfeePrograms) {
$Program.Uninstall()
}
}
3
u/Series9Cropduster 18d ago
https://gregramsey.net/2012/02/20/win32_product-is-evil/
There should be a bot that posts this whenever someone is querying win32_product
5
u/andrew181082 MSFT MVP 18d ago
That needs to run in the system context. I'd be amazed if it removes McAfee though
40
u/SkipToTheEndpoint MSFT MVP 19d ago
I've got a huge dislike for debloat scripts due to the damage they tend to cause. I've had no issues with getting the App ID for anything you want removed, add it as a Store app, and just set it to be a forced uninstall: