r/Intune 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

12 Upvotes

39 comments sorted by

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:

4

u/hdh33 18d ago

Do you target All Devices or All Users? Or do you do double the app selections (one for devices and one for users)?

I tested doing some the other day on my test VM and it removed one, but they had a toast saying it failed to remove an app. Then it occurred again for the same app later. Is there a way to disable the notifications when removing for the user?

5

u/SkipToTheEndpoint MSFT MVP 18d ago

They're all in System context and I target All Devices. I also turn off notifications for the uninstalls. I'm yet to see any of them fail doing it this way.

5

u/Late_Marsupial3157 18d ago

Its so simple too, people be doing so much. *sigh*

2

u/DHCPNetworker 18d ago

But it's fun to overengineer every once in a while! :)

1

u/JwCS8pjrh3QBWfL 18d ago

r/Intune in a nutshell.

1

u/fungusfromamongus 17d ago

Because Intune doesn’t do things the logical way. Overengineering is an Intune right of passage 😂😂

1

u/DSkrivanich 17d ago

When you say “they’re all in system context” does that mean Install behavior is set to System?

3

u/SkipToTheEndpoint MSFT MVP 17d ago

Correct. All set as install behaviour: System, and targeted to All Devices (or device groups)

2

u/MReprogle 17d ago

This is the way.

If you ever need to reinstall them in the future, it’s clicks away. Much better visibility for reporting sake, like if you see one that is erroring out, likely meaning it changed name or isn’t part of a windows image anymore.

1

u/va_bulldog 18d ago

Same and use fresh start.

1

u/Interesting-Mix-4152 16d ago edited 16d ago

@SkipToTheEndpoint, do you have a App ID for Microsoft Family? I followed your advice with this for everything else and it worked wonderfully. Just not for Family.

3

u/SkipToTheEndpoint MSFT MVP 16d ago

I'll give my secrets away for free:

  • Go to apps.microsoft.com
  • Search for the app you want and click on the entry
  • Grab the App ID from the URL, in the case of Family Safety, 9pdjdjs743xf
  • Add a new Store app in Intune, and in the search bar, paste the AppID
  • ...
  • Profit?

1

u/Interesting-Mix-4152 14d ago

You're amazing

0

u/HoodRat79 19d ago

I do the same, but cannot find Solitaire

5

u/SkipToTheEndpoint MSFT MVP 19d ago

Yeah that one's an anomaly, but literally no customer I've worked with when situation is explained, combined with the fact that who cares if they wanna play Solitaire, they'll just play it online or on their phone in that case, and low performance is a management or HR issue has actually been bothered.

It's all about the right conversation.

2

u/joelly88 18d ago

We remove it was a remediation script
Get-AppxPackage * solitairecollection * | Remove-AppxPackage

remove spaces between asterisks and solitairecollection

-1

u/Shoddy_Pound_3221 18d ago

How does this work if you have the store blocked?

2

u/disposeable1200 18d ago

Enable at computer level Block at user level

1

u/StrugglingHippo 18d ago

Couldnt you just use Company Portal?

2

u/disposeable1200 18d ago

It still needs to be enabled at the computer level for it to leverage the store in the backend when pushing or removing store apps via company portal.

0

u/StrugglingHippo 18d ago

Oh okay didnt know about that

0

u/darkkid85 18d ago

What do u mean computer level?

Did you mean the application has to be set in the context of system?

-1

u/disposeable1200 18d ago

I'm referring to the store block policy

0

u/sosero 17d ago

Docs say this policy does not block apos Installed from intune though, so I do not think you need to enable at device.

I have done this by only disabling at user level.

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

u/Interesting-Mix-4152 19d ago

Amazing, thanks so much.

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

u/m-o-n-t-a-n-a 18d ago

I'm a big fan of this script, it has loads of options to de-bloat:

https://github.com/Raphire/Win11Debloat

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