Whenever I install Windows 10/11, I run a PS script to remove some default bloatware.
$bloatware = @(
"ActiproSoftwareLLC"
"AdobeSystemsIncorporated.AdobePhotoshopExpress"
"BingNews"
"BubbleWitch3Saga"
"CandyCrush"
"Duolingo"
"EclipseManager"
"Facebook"
"Flipboard"
"GetHelp"
"Getstarted"
"Messaging"
"Microsoft3DViewer"
"MicrosoftOfficeHub"
"MicrosoftSolitaireCollection"
"Minecraft"
"MixedReality"
"News"
"Office.Lens"
"Office.OneNote"
"Office.Sway"
"Office.Todo.List"
"OneConnect"
"PandoraMediaInc"
"Microsoft.People"
"Print3D"
"Royal Revolt"
"SkypeApp"
"Speed Test"
"Spotify"
"Sway"
"Twitter"
"Wallet"
"Weather"
"Whiteboard"
"windowscommunicationsapps"
"WindowsFeedbackHub"
"WindowsMaps"
"Wunderlist"
"Xbox.TCUI"
"XboxApp"
"XboxGameOverlay"
"XboxIdentityProvider"
"XboxSpeechToTextOverlay"
"YourPhone"
"ZuneMusic"
"ZuneVideo"
)
foreach ($bloat in $bloatware) {
Get-AppxPackage -AllUsers -Name *$bloat* | Remove-AppxPackage
}
The script runs with no issues, but if I create another local user for the machine, the same apps are reinstalled to the new user even though I used the -AllUsers parameter.
How can I prevent those apps from being installed when a user is created?