Jump to content

Recommended Posts

Posted

Still using MDT here and just started imaging a new batch of laptops and noticed the Xbox app is still there plus a bunch of other apps when they should have been removed as part of the task sequence. Looking at the debloat script it dates back from 2016 so not surprised it didn't work.

 

Could someone kindly share their debloat script please 🙂  

Posted

I run mine against the factory image after first importing it into MDT, rather than doing it as part of a TS. Either way, this shows you which AppX packages are being removed. The paths here may need adjusting to suit your environment.

 

Mount the vanilla image

 

Mount-WindowsImage -ImagePath "E:\DeploymentShare01\Operating Systems\Windows 11 Education 24H2 (Oct 2024)\sources\install.wim" -Index 1 -Path "E:\Mounted"

 

Run the script

# Create a list of unwanted AppX package names.
$Apps = @(
    "*DevHome*"
    "*FeedbackHub*"
    "*GamingApp*"
    "*GetHelp*"
    "*Getstarted*"
    "*Microsoft3DViewer*"
    "*MicrosoftOfficeHub*"
    "*MixedReality*"
    "*News*"
    "*OneNote*"
    "*Outlook*"
    "*People*"
    "*PowerAutomateDesktop*"
    "*Skype*"
    "*Solitaire*"
    "*Todos*"
    "*Weather*"
    "*WindowsMaps*"
    "*Xbox*"
    "*YourPhone*"
)
 
# Remove packages for all users.
ForEach($App in $Apps){
    Get-AppxProvisionedPackage -Path "E:\Mounted" | where {$_.PackageName -like $App} | Remove-AppxProvisionedPackage
}

 

Dismount and save the new image

Dismount-WindowsImage -Path "E:\Mounted" -Save

 

  • Like 1

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...