[{"data":1,"prerenderedAt":2696},["ShallowReactive",2],{"post:\u002F2025\u002F11\u002F05\u002Fpowershell-windows-11-strip-preinstalled-apps-from-a-deployment-image\u002F":3},{"post":4,"newer":2660,"older":2669,"related":2677,"series":2694},{"id":5,"title":6,"body":7,"canonical":2639,"categories":2640,"date":2643,"description":2644,"extension":2645,"featured":2646,"hero":2647,"image":2647,"meta":2648,"navigation":262,"path":2649,"readingTime":286,"seo":2650,"series":2647,"seriesOrder":2647,"sites":2651,"source":2647,"stem":2652,"tags":2653,"updated":2647,"url":2658,"__hash__":2659},"blog\u002Fblog\u002F2025\u002F11\u002F05\u002Fpowershell-windows-11-strip-preinstalled-apps-from-a-deployment-image.md","PowerShell: Windows 11 – Strip Preinstalled Apps from an Image",{"type":8,"value":9,"toc":2629},"minimark",[10,19,28,33,73,77,139,143,149,193,196,319,322,330,333,353,356,385,389,1712,1716,1786,1791,1799,1829,1832,2424,2427,2566,2569,2573,2625],[11,12,13,14,18],"p",{},"Every Windows 11 image ships with a set of provisioned apps that show up for every new user profile whether anyone asked for them or not: a game bar overlay, a \"get started\" tile, a weather app, a solitaire collection nobody in a business environment needs. Removing them one at a time through Settings only fixes the current profile; the provisioned package is still staged for the next person who signs in. This script strips a configurable list of apps either from an offline image mounted with ",[15,16,17],"code",{},"Mount-WindowsImage"," or from a running system, so the packages never get provisioned in the first place.",[11,20,21,22,27],{},"Offline is the path I prefer. Microsoft's Sysprep troubleshooting article points out that the \"installed for a user, but not provisioned for all users\" failure doesn't occur when you service an offline image, because deprovisioning offline clears the package for every user, including the one running the command. On a running system you have to remove the per-user installs as well, which the script does. (If you're debloating a reference VM you're about to sysprep instead, use the ",[23,24,26],"a",{"href":25},"\u002F2025\u002F07\u002F16\u002Fpowershell-windows-11-debloat-a-golden-image-before-sysprep\u002F","golden image version",".)",[29,30,32],"h2",{"id":31},"requirements","Requirements",[34,35,36,48,55,66],"ul",{},[37,38,39,40,43,44,47],"li",{},"Windows 10 or 11 with the in-box ",[15,41,42],{},"Dism"," and ",[15,45,46],{},"Appx"," PowerShell modules, run from an elevated Windows PowerShell 5.1 session.",[37,49,50,51,54],{},"Offline mode: ",[15,52,53],{},"install.wim"," copied to a writable local disk (not mounted read-only from the ISO), an empty mount folder, and free space for the mounted image.",[37,56,57,58,61,62,65],{},"Online mode: test with ",[15,59,60],{},"-WhatIf"," first. ",[15,63,64],{},"Remove-AppxPackage -AllUsers"," removes the app for every account on the machine and needs administrator rights.",[37,67,68,69,72],{},"DISM writes its log to ",[15,70,71],{},"%WINDIR%\\Logs\\Dism\\dism.log"," by default, which is where to look when a removal fails.",[29,74,76],{"id":75},"parameters","Parameters",[78,79,80,99],"table",{},[81,82,83],"thead",{},[84,85,86,90,93,96],"tr",{},[87,88,89],"th",{},"Name",[87,91,92],{},"Type",[87,94,95],{},"Required",[87,97,98],{},"Description",[100,101,102,122],"tbody",{},[84,103,104,110,116,119],{},[105,106,107],"td",{},[15,108,109],{},"AppxNamePattern",[105,111,112,113],{},"string",[114,115],"span",{},[105,117,118],{},"No",[105,120,121],{},"Package name prefixes to match and remove. Defaults to a consumer-app list (see script).",[84,123,124,129,131,133],{},[105,125,126],{},[15,127,128],{},"ImagePath",[105,130,112],{},[105,132,118],{},[105,134,135,136,138],{},"Root folder of an offline Windows image already mounted with ",[15,137,17],{},". Omit to operate on the running system.",[29,140,142],{"id":141},"usage","Usage",[11,144,145,146,148],{},"Find the index of the edition you deploy. An ",[15,147,53],{}," from Microsoft's media holds several editions:",[150,151,156],"pre",{"className":152,"code":153,"language":154,"meta":155,"style":155},"language-powershell shiki shiki-themes github-dark","Get-WindowsImage -ImagePath \"C:\\Images\\install.wim\" | Format-Table ImageIndex, ImageName\n","powershell","",[15,157,158],{"__ignoreMap":155},[114,159,162,166,170,174,178,181,184,187,190],{"class":160,"line":161},"line",1,[114,163,165],{"class":164},"sDLfK","Get-WindowsImage",[114,167,169],{"class":168},"snl16"," -",[114,171,173],{"class":172},"s95oV","ImagePath ",[114,175,177],{"class":176},"sU2Wk","\"C:\\Images\\install.wim\"",[114,179,180],{"class":168}," |",[114,182,183],{"class":164}," Format-Table",[114,185,186],{"class":172}," ImageIndex",[114,188,189],{"class":168},",",[114,191,192],{"class":172}," ImageName\n",[11,194,195],{},"Mount it, preview the removals, strip the default list, then commit and unmount:",[150,197,199],{"className":152,"code":198,"language":154,"meta":155,"style":155},"New-Item -Path \"C:\\Mount\\Win11\" -ItemType Directory -Force | Out-Null\nMount-WindowsImage -ImagePath \"C:\\Images\\install.wim\" -Index 3 -Path \"C:\\Mount\\Win11\"\n\n.\\Remove-PreinstalledApps.ps1 -ImagePath \"C:\\Mount\\Win11\" -WhatIf\n.\\Remove-PreinstalledApps.ps1 -ImagePath \"C:\\Mount\\Win11\"\n\nDismount-WindowsImage -Path \"C:\\Mount\\Win11\" -Save\n",[15,200,201,231,257,264,284,297,302],{"__ignoreMap":155},[114,202,203,206,208,211,214,216,219,222,225,228],{"class":160,"line":161},[114,204,205],{"class":164},"New-Item",[114,207,169],{"class":168},[114,209,210],{"class":172},"Path ",[114,212,213],{"class":176},"\"C:\\Mount\\Win11\"",[114,215,169],{"class":168},[114,217,218],{"class":172},"ItemType Directory ",[114,220,221],{"class":168},"-",[114,223,224],{"class":172},"Force ",[114,226,227],{"class":168},"|",[114,229,230],{"class":164}," Out-Null\n",[114,232,234,236,238,240,242,244,247,250,252,254],{"class":160,"line":233},2,[114,235,17],{"class":164},[114,237,169],{"class":168},[114,239,173],{"class":172},[114,241,177],{"class":176},[114,243,169],{"class":168},[114,245,246],{"class":172},"Index ",[114,248,249],{"class":164},"3",[114,251,169],{"class":168},[114,253,210],{"class":172},[114,255,256],{"class":176},"\"C:\\Mount\\Win11\"\n",[114,258,260],{"class":160,"line":259},3,[114,261,263],{"emptyLinePlaceholder":262},true,"\n",[114,265,267,270,273,275,277,279,281],{"class":160,"line":266},4,[114,268,269],{"class":172},".",[114,271,272],{"class":164},"\\Remove-PreinstalledApps.ps1",[114,274,169],{"class":168},[114,276,173],{"class":172},[114,278,213],{"class":176},[114,280,169],{"class":168},[114,282,283],{"class":172},"WhatIf\n",[114,285,287,289,291,293,295],{"class":160,"line":286},5,[114,288,269],{"class":172},[114,290,272],{"class":164},[114,292,169],{"class":168},[114,294,173],{"class":172},[114,296,256],{"class":176},[114,298,300],{"class":160,"line":299},6,[114,301,263],{"emptyLinePlaceholder":262},[114,303,305,308,310,312,314,316],{"class":160,"line":304},7,[114,306,307],{"class":164},"Dismount-WindowsImage",[114,309,169],{"class":168},[114,311,210],{"class":172},[114,313,213],{"class":176},[114,315,169],{"class":168},[114,317,318],{"class":172},"Save\n",[11,320,321],{},"Sample output from the offline run:",[150,323,328],{"className":324,"code":326,"language":327,"meta":155},[325],"language-text","Found 17 matching provisioned package(s) in C:\\Mount\\Win11.\nRemoved provisioned package: Clipchamp.Clipchamp\nRemoved provisioned package: Microsoft.BingNews\nRemoved provisioned package: Microsoft.BingWeather\n...\nRemoved provisioned package: Microsoft.ZuneMusic\nRemaining matching provisioned packages: 0\n","text",[15,329,326],{"__ignoreMap":155},[11,331,332],{},"If something goes wrong, throw the changes away instead of saving them:",[150,334,336],{"className":152,"code":335,"language":154,"meta":155,"style":155},"Dismount-WindowsImage -Path \"C:\\Mount\\Win11\" -Discard\n",[15,337,338],{"__ignoreMap":155},[114,339,340,342,344,346,348,350],{"class":160,"line":161},[114,341,307],{"class":164},[114,343,169],{"class":168},[114,345,210],{"class":172},[114,347,213],{"class":176},[114,349,169],{"class":168},[114,351,352],{"class":172},"Discard\n",[11,354,355],{},"Remove only a custom list of packages from the running system:",[150,357,359],{"className":152,"code":358,"language":154,"meta":155,"style":155},".\\Remove-PreinstalledApps.ps1 -AppxNamePattern \"Microsoft.ZuneMusic\", \"Microsoft.ZuneVideo\", \"Clipchamp.Clipchamp\"\n",[15,360,361],{"__ignoreMap":155},[114,362,363,365,367,369,372,375,377,380,382],{"class":160,"line":161},[114,364,269],{"class":172},[114,366,272],{"class":164},[114,368,169],{"class":168},[114,370,371],{"class":172},"AppxNamePattern ",[114,373,374],{"class":176},"\"Microsoft.ZuneMusic\"",[114,376,189],{"class":168},[114,378,379],{"class":176}," \"Microsoft.ZuneVideo\"",[114,381,189],{"class":168},[114,383,384],{"class":176}," \"Clipchamp.Clipchamp\"\n",[29,386,388],{"id":387},"script","Script",[150,390,392],{"className":152,"code":391,"language":154,"meta":155,"style":155},"\u003C#\n.SYNOPSIS\n    Removes provisioned Windows 11 apps from a running system or an offline mounted image.\n.DESCRIPTION\n    Matches provisioned AppX packages against a list of name prefixes and removes them,\n    either from an offline image already mounted with Mount-WindowsImage (which clears\n    the package for all users of that image) or from the running system. Online, it also\n    removes the installed package for every existing user profile, because\n    Remove-AppxProvisionedPackage does not touch existing accounts. Supports -WhatIf.\n.PARAMETER AppxNamePattern\n    Package name prefixes to match and remove. Defaults to a consumer-app list.\n.PARAMETER ImagePath\n    Root folder of an offline Windows image already mounted with Mount-WindowsImage.\n    Omit to operate on the running system.\n.EXAMPLE\n    .\\Remove-PreinstalledApps.ps1 -WhatIf\n.EXAMPLE\n    .\\Remove-PreinstalledApps.ps1 -ImagePath \"C:\\Mount\\Win11\"\n.NOTES\n    Author  : Thomas Lasswell (https:\u002F\u002Fwww.techcolumnist.com)\n    Version : 1.0 (2025-11-05)\n    Requires: Windows PowerShell 5.1 (elevated), in-box Dism and Appx modules\n#>\n\n#Requires -RunAsAdministrator\n\n[CmdletBinding(SupportsShouldProcess = $true)]\nparam (\n    [string[]]$AppxNamePattern = @(\n        \"Clipchamp.Clipchamp\",\n        \"Microsoft.BingNews\",\n        \"Microsoft.BingWeather\",\n        \"Microsoft.GamingApp\",\n        \"Microsoft.GetHelp\",\n        \"Microsoft.Getstarted\",\n        \"Microsoft.MicrosoftOfficeHub\",\n        \"Microsoft.MicrosoftSolitaireCollection\",\n        \"Microsoft.PowerAutomateDesktop\",\n        \"Microsoft.Todos\",\n        \"Microsoft.WindowsFeedbackHub\",\n        \"Microsoft.WindowsMaps\",\n        \"Microsoft.Xbox\",\n        \"Microsoft.YourPhone\",\n        \"Microsoft.ZuneMusic\",\n        \"Microsoft.ZuneVideo\"\n    ),\n\n    [string]$ImagePath\n)\n\n# Return $true when a name starts with any of the prefixes.\nfunction Test-PrefixMatch {\n    param (\n        [string]$Name,\n        [string[]]$Prefix\n    )\n\n    foreach ($p in $Prefix) {\n        if ($Name -like \"$p*\") {\n            return $true\n        }\n    }\n\n    return $false\n}\n\n# Return the provisioned packages that match one of the name prefixes.\nfunction Get-MatchingProvisionedPackage {\n    param (\n        [string]$ImagePath,\n        [string[]]$NamePattern\n    )\n\n    if ($ImagePath) {\n        $provisioned = Get-AppxProvisionedPackage -Path $ImagePath\n    } else {\n        $provisioned = Get-AppxProvisionedPackage -Online\n    }\n\n    @($provisioned | Where-Object { Test-PrefixMatch -Name $_.DisplayName -Prefix $NamePattern })\n}\n\nif ($ImagePath -and -not (Test-Path -Path (Join-Path -Path $ImagePath -ChildPath \"Windows\"))) {\n    throw \"No Windows folder under '$ImagePath'. Mount the WIM first with Mount-WindowsImage.\"\n}\n\n$target = if ($ImagePath) { $ImagePath } else { \"the running system\" }\n\n# Online only: remove installed copies for every account first. Removing only the\n# provisioned package leaves existing profiles untouched.\nif (-not $ImagePath) {\n    $installed = @(Get-AppxPackage -AllUsers | Where-Object { Test-PrefixMatch -Name $_.Name -Prefix $AppxNamePattern })\n\n    foreach ($package in $installed) {\n        if ($PSCmdlet.ShouldProcess($package.PackageFullName, \"Remove installed package for all users\")) {\n            try {\n                Remove-AppxPackage -Package $package.PackageFullName -AllUsers -ErrorAction Stop\n                Write-Host \"Removed installed package: $($package.PackageFullName)\"\n            } catch {\n                Write-Warning \"Could not remove $($package.PackageFullName): $($_.Exception.Message)\"\n            }\n        }\n    }\n}\n\n$toRemove = Get-MatchingProvisionedPackage -ImagePath $ImagePath -NamePattern $AppxNamePattern\nWrite-Host \"Found $($toRemove.Count) matching provisioned package(s) in $target.\"\n\nforeach ($package in $toRemove) {\n    if ($PSCmdlet.ShouldProcess($package.DisplayName, \"Remove provisioned package\")) {\n        try {\n            if ($ImagePath) {\n                Remove-AppxProvisionedPackage -Path $ImagePath -PackageName $package.PackageName -ErrorAction Stop | Out-Null\n            } else {\n                Remove-AppxProvisionedPackage -Online -PackageName $package.PackageName -ErrorAction Stop | Out-Null\n            }\n\n            Write-Host \"Removed provisioned package: $($package.DisplayName)\"\n        } catch {\n            Write-Warning \"Could not remove $($package.DisplayName): $($_.Exception.Message) (see %WINDIR%\\Logs\\Dism\\dism.log)\"\n        }\n    }\n}\n\n$remaining = Get-MatchingProvisionedPackage -ImagePath $ImagePath -NamePattern $AppxNamePattern\nWrite-Host \"Remaining matching provisioned packages: $($remaining.Count)\"\n$remaining | Select-Object DisplayName, PackageName\n",[15,393,394,400,407,412,419,424,429,434,440,446,457,463,473,479,485,493,499,506,512,520,526,532,538,544,549,558,563,588,597,617,626,634,642,650,658,666,674,682,690,698,706,714,722,730,738,744,752,757,767,773,778,784,797,805,818,828,834,839,854,878,887,893,899,904,913,919,924,930,940,947,959,969,974,979,988,1004,1015,1029,1034,1039,1075,1080,1085,1130,1145,1150,1155,1179,1184,1190,1196,1209,1251,1256,1269,1290,1298,1318,1341,1352,1385,1391,1396,1401,1406,1411,1431,1458,1463,1476,1495,1503,1511,1535,1544,1566,1571,1576,1596,1606,1637,1642,1647,1652,1657,1675,1694],{"__ignoreMap":155},[114,395,396],{"class":160,"line":161},[114,397,399],{"class":398},"sAwPA","\u003C#\n",[114,401,402,404],{"class":160,"line":233},[114,403,269],{"class":164},[114,405,406],{"class":168},"SYNOPSIS\n",[114,408,409],{"class":160,"line":259},[114,410,411],{"class":398},"    Removes provisioned Windows 11 apps from a running system or an offline mounted image.\n",[114,413,414,416],{"class":160,"line":266},[114,415,269],{"class":164},[114,417,418],{"class":168},"DESCRIPTION\n",[114,420,421],{"class":160,"line":286},[114,422,423],{"class":398},"    Matches provisioned AppX packages against a list of name prefixes and removes them,\n",[114,425,426],{"class":160,"line":299},[114,427,428],{"class":398},"    either from an offline image already mounted with Mount-WindowsImage (which clears\n",[114,430,431],{"class":160,"line":304},[114,432,433],{"class":398},"    the package for all users of that image) or from the running system. Online, it also\n",[114,435,437],{"class":160,"line":436},8,[114,438,439],{"class":398},"    removes the installed package for every existing user profile, because\n",[114,441,443],{"class":160,"line":442},9,[114,444,445],{"class":398},"    Remove-AppxProvisionedPackage does not touch existing accounts. Supports -WhatIf.\n",[114,447,449,451,454],{"class":160,"line":448},10,[114,450,269],{"class":164},[114,452,453],{"class":168},"PARAMETER",[114,455,456],{"class":168}," AppxNamePattern\n",[114,458,460],{"class":160,"line":459},11,[114,461,462],{"class":398},"    Package name prefixes to match and remove. Defaults to a consumer-app list.\n",[114,464,466,468,470],{"class":160,"line":465},12,[114,467,269],{"class":164},[114,469,453],{"class":168},[114,471,472],{"class":168}," ImagePath\n",[114,474,476],{"class":160,"line":475},13,[114,477,478],{"class":398},"    Root folder of an offline Windows image already mounted with Mount-WindowsImage.\n",[114,480,482],{"class":160,"line":481},14,[114,483,484],{"class":398},"    Omit to operate on the running system.\n",[114,486,488,490],{"class":160,"line":487},15,[114,489,269],{"class":164},[114,491,492],{"class":168},"EXAMPLE\n",[114,494,496],{"class":160,"line":495},16,[114,497,498],{"class":398},"    .\\Remove-PreinstalledApps.ps1 -WhatIf\n",[114,500,502,504],{"class":160,"line":501},17,[114,503,269],{"class":164},[114,505,492],{"class":168},[114,507,509],{"class":160,"line":508},18,[114,510,511],{"class":398},"    .\\Remove-PreinstalledApps.ps1 -ImagePath \"C:\\Mount\\Win11\"\n",[114,513,515,517],{"class":160,"line":514},19,[114,516,269],{"class":164},[114,518,519],{"class":168},"NOTES\n",[114,521,523],{"class":160,"line":522},20,[114,524,525],{"class":398},"    Author  : Thomas Lasswell (https:\u002F\u002Fwww.techcolumnist.com)\n",[114,527,529],{"class":160,"line":528},21,[114,530,531],{"class":398},"    Version : 1.0 (2025-11-05)\n",[114,533,535],{"class":160,"line":534},22,[114,536,537],{"class":398},"    Requires: Windows PowerShell 5.1 (elevated), in-box Dism and Appx modules\n",[114,539,541],{"class":160,"line":540},23,[114,542,543],{"class":398},"#>\n",[114,545,547],{"class":160,"line":546},24,[114,548,263],{"emptyLinePlaceholder":262},[114,550,552,555],{"class":160,"line":551},25,[114,553,554],{"class":398},"#",[114,556,557],{"class":168},"Requires -RunAsAdministrator\n",[114,559,561],{"class":160,"line":560},26,[114,562,263],{"emptyLinePlaceholder":262},[114,564,566,569,572,575,579,582,585],{"class":160,"line":565},27,[114,567,568],{"class":172},"[",[114,570,571],{"class":164},"CmdletBinding",[114,573,574],{"class":172},"(",[114,576,578],{"class":577},"s9osk","SupportsShouldProcess",[114,580,581],{"class":168}," =",[114,583,584],{"class":164}," $true",[114,586,587],{"class":172},")]\n",[114,589,591,594],{"class":160,"line":590},28,[114,592,593],{"class":168},"param",[114,595,596],{"class":172}," (\n",[114,598,600,603,605,608,611,614],{"class":160,"line":599},29,[114,601,602],{"class":172},"    [",[114,604,112],{"class":168},[114,606,607],{"class":172},"[]]$AppxNamePattern ",[114,609,610],{"class":168},"=",[114,612,613],{"class":168}," @",[114,615,616],{"class":172},"(\n",[114,618,620,623],{"class":160,"line":619},30,[114,621,622],{"class":176},"        \"Clipchamp.Clipchamp\"",[114,624,625],{"class":168},",\n",[114,627,629,632],{"class":160,"line":628},31,[114,630,631],{"class":176},"        \"Microsoft.BingNews\"",[114,633,625],{"class":168},[114,635,637,640],{"class":160,"line":636},32,[114,638,639],{"class":176},"        \"Microsoft.BingWeather\"",[114,641,625],{"class":168},[114,643,645,648],{"class":160,"line":644},33,[114,646,647],{"class":176},"        \"Microsoft.GamingApp\"",[114,649,625],{"class":168},[114,651,653,656],{"class":160,"line":652},34,[114,654,655],{"class":176},"        \"Microsoft.GetHelp\"",[114,657,625],{"class":168},[114,659,661,664],{"class":160,"line":660},35,[114,662,663],{"class":176},"        \"Microsoft.Getstarted\"",[114,665,625],{"class":168},[114,667,669,672],{"class":160,"line":668},36,[114,670,671],{"class":176},"        \"Microsoft.MicrosoftOfficeHub\"",[114,673,625],{"class":168},[114,675,677,680],{"class":160,"line":676},37,[114,678,679],{"class":176},"        \"Microsoft.MicrosoftSolitaireCollection\"",[114,681,625],{"class":168},[114,683,685,688],{"class":160,"line":684},38,[114,686,687],{"class":176},"        \"Microsoft.PowerAutomateDesktop\"",[114,689,625],{"class":168},[114,691,693,696],{"class":160,"line":692},39,[114,694,695],{"class":176},"        \"Microsoft.Todos\"",[114,697,625],{"class":168},[114,699,701,704],{"class":160,"line":700},40,[114,702,703],{"class":176},"        \"Microsoft.WindowsFeedbackHub\"",[114,705,625],{"class":168},[114,707,709,712],{"class":160,"line":708},41,[114,710,711],{"class":176},"        \"Microsoft.WindowsMaps\"",[114,713,625],{"class":168},[114,715,717,720],{"class":160,"line":716},42,[114,718,719],{"class":176},"        \"Microsoft.Xbox\"",[114,721,625],{"class":168},[114,723,725,728],{"class":160,"line":724},43,[114,726,727],{"class":176},"        \"Microsoft.YourPhone\"",[114,729,625],{"class":168},[114,731,733,736],{"class":160,"line":732},44,[114,734,735],{"class":176},"        \"Microsoft.ZuneMusic\"",[114,737,625],{"class":168},[114,739,741],{"class":160,"line":740},45,[114,742,743],{"class":176},"        \"Microsoft.ZuneVideo\"\n",[114,745,747,750],{"class":160,"line":746},46,[114,748,749],{"class":172},"    )",[114,751,625],{"class":168},[114,753,755],{"class":160,"line":754},47,[114,756,263],{"emptyLinePlaceholder":262},[114,758,760,762,764],{"class":160,"line":759},48,[114,761,602],{"class":172},[114,763,112],{"class":168},[114,765,766],{"class":172},"]$ImagePath\n",[114,768,770],{"class":160,"line":769},49,[114,771,772],{"class":172},")\n",[114,774,776],{"class":160,"line":775},50,[114,777,263],{"emptyLinePlaceholder":262},[114,779,781],{"class":160,"line":780},51,[114,782,783],{"class":398},"# Return $true when a name starts with any of the prefixes.\n",[114,785,787,790,794],{"class":160,"line":786},52,[114,788,789],{"class":168},"function",[114,791,793],{"class":792},"svObZ"," Test-PrefixMatch",[114,795,796],{"class":172}," {\n",[114,798,800,803],{"class":160,"line":799},53,[114,801,802],{"class":168},"    param",[114,804,596],{"class":172},[114,806,808,811,813,816],{"class":160,"line":807},54,[114,809,810],{"class":172},"        [",[114,812,112],{"class":168},[114,814,815],{"class":172},"]$Name",[114,817,625],{"class":168},[114,819,821,823,825],{"class":160,"line":820},55,[114,822,810],{"class":172},[114,824,112],{"class":168},[114,826,827],{"class":172},"[]]$Prefix\n",[114,829,831],{"class":160,"line":830},56,[114,832,833],{"class":172},"    )\n",[114,835,837],{"class":160,"line":836},57,[114,838,263],{"emptyLinePlaceholder":262},[114,840,842,845,848,851],{"class":160,"line":841},58,[114,843,844],{"class":168},"    foreach",[114,846,847],{"class":172}," ($p ",[114,849,850],{"class":168},"in",[114,852,853],{"class":172}," $Prefix) {\n",[114,855,857,860,863,866,869,872,875],{"class":160,"line":856},59,[114,858,859],{"class":168},"        if",[114,861,862],{"class":172}," ($Name ",[114,864,865],{"class":168},"-like",[114,867,868],{"class":176}," \"",[114,870,871],{"class":172},"$p",[114,873,874],{"class":176},"*\"",[114,876,877],{"class":172},") {\n",[114,879,881,884],{"class":160,"line":880},60,[114,882,883],{"class":168},"            return",[114,885,886],{"class":164}," $true\n",[114,888,890],{"class":160,"line":889},61,[114,891,892],{"class":172},"        }\n",[114,894,896],{"class":160,"line":895},62,[114,897,898],{"class":172},"    }\n",[114,900,902],{"class":160,"line":901},63,[114,903,263],{"emptyLinePlaceholder":262},[114,905,907,910],{"class":160,"line":906},64,[114,908,909],{"class":168},"    return",[114,911,912],{"class":164}," $false\n",[114,914,916],{"class":160,"line":915},65,[114,917,918],{"class":172},"}\n",[114,920,922],{"class":160,"line":921},66,[114,923,263],{"emptyLinePlaceholder":262},[114,925,927],{"class":160,"line":926},67,[114,928,929],{"class":398},"# Return the provisioned packages that match one of the name prefixes.\n",[114,931,933,935,938],{"class":160,"line":932},68,[114,934,789],{"class":168},[114,936,937],{"class":792}," Get-MatchingProvisionedPackage",[114,939,796],{"class":172},[114,941,943,945],{"class":160,"line":942},69,[114,944,802],{"class":168},[114,946,596],{"class":172},[114,948,950,952,954,957],{"class":160,"line":949},70,[114,951,810],{"class":172},[114,953,112],{"class":168},[114,955,956],{"class":172},"]$ImagePath",[114,958,625],{"class":168},[114,960,962,964,966],{"class":160,"line":961},71,[114,963,810],{"class":172},[114,965,112],{"class":168},[114,967,968],{"class":172},"[]]$NamePattern\n",[114,970,972],{"class":160,"line":971},72,[114,973,833],{"class":172},[114,975,977],{"class":160,"line":976},73,[114,978,263],{"emptyLinePlaceholder":262},[114,980,982,985],{"class":160,"line":981},74,[114,983,984],{"class":168},"    if",[114,986,987],{"class":172}," ($ImagePath) {\n",[114,989,991,994,996,999,1001],{"class":160,"line":990},75,[114,992,993],{"class":172},"        $provisioned ",[114,995,610],{"class":168},[114,997,998],{"class":164}," Get-AppxProvisionedPackage",[114,1000,169],{"class":168},[114,1002,1003],{"class":172},"Path $ImagePath\n",[114,1005,1007,1010,1013],{"class":160,"line":1006},76,[114,1008,1009],{"class":172},"    } ",[114,1011,1012],{"class":168},"else",[114,1014,796],{"class":172},[114,1016,1018,1020,1022,1024,1026],{"class":160,"line":1017},77,[114,1019,993],{"class":172},[114,1021,610],{"class":168},[114,1023,998],{"class":164},[114,1025,169],{"class":168},[114,1027,1028],{"class":172},"Online\n",[114,1030,1032],{"class":160,"line":1031},78,[114,1033,898],{"class":172},[114,1035,1037],{"class":160,"line":1036},79,[114,1038,263],{"emptyLinePlaceholder":262},[114,1040,1042,1045,1048,1050,1053,1056,1059,1061,1064,1067,1070,1072],{"class":160,"line":1041},80,[114,1043,1044],{"class":168},"    @",[114,1046,1047],{"class":172},"($provisioned ",[114,1049,227],{"class":168},[114,1051,1052],{"class":164}," Where-Object",[114,1054,1055],{"class":172}," { ",[114,1057,1058],{"class":164},"Test-PrefixMatch",[114,1060,169],{"class":168},[114,1062,1063],{"class":172},"Name ",[114,1065,1066],{"class":164},"$_",[114,1068,1069],{"class":172},".DisplayName ",[114,1071,221],{"class":168},[114,1073,1074],{"class":172},"Prefix $NamePattern })\n",[114,1076,1078],{"class":160,"line":1077},81,[114,1079,918],{"class":172},[114,1081,1083],{"class":160,"line":1082},82,[114,1084,263],{"emptyLinePlaceholder":262},[114,1086,1088,1091,1094,1097,1100,1103,1106,1108,1111,1114,1116,1119,1121,1124,1127],{"class":160,"line":1087},83,[114,1089,1090],{"class":168},"if",[114,1092,1093],{"class":172}," ($ImagePath ",[114,1095,1096],{"class":168},"-and",[114,1098,1099],{"class":168}," -not",[114,1101,1102],{"class":172}," (",[114,1104,1105],{"class":164},"Test-Path",[114,1107,169],{"class":168},[114,1109,1110],{"class":172},"Path (",[114,1112,1113],{"class":164},"Join-Path",[114,1115,169],{"class":168},[114,1117,1118],{"class":172},"Path $ImagePath ",[114,1120,221],{"class":168},[114,1122,1123],{"class":172},"ChildPath ",[114,1125,1126],{"class":176},"\"Windows\"",[114,1128,1129],{"class":172},"))) {\n",[114,1131,1133,1136,1139,1142],{"class":160,"line":1132},84,[114,1134,1135],{"class":168},"    throw",[114,1137,1138],{"class":176}," \"No Windows folder under '",[114,1140,1141],{"class":172},"$ImagePath",[114,1143,1144],{"class":176},"'. Mount the WIM first with Mount-WindowsImage.\"\n",[114,1146,1148],{"class":160,"line":1147},85,[114,1149,918],{"class":172},[114,1151,1153],{"class":160,"line":1152},86,[114,1154,263],{"emptyLinePlaceholder":262},[114,1156,1158,1161,1163,1166,1169,1171,1173,1176],{"class":160,"line":1157},87,[114,1159,1160],{"class":172},"$target ",[114,1162,610],{"class":168},[114,1164,1165],{"class":168}," if",[114,1167,1168],{"class":172}," ($ImagePath) { $ImagePath } ",[114,1170,1012],{"class":168},[114,1172,1055],{"class":172},[114,1174,1175],{"class":176},"\"the running system\"",[114,1177,1178],{"class":172}," }\n",[114,1180,1182],{"class":160,"line":1181},88,[114,1183,263],{"emptyLinePlaceholder":262},[114,1185,1187],{"class":160,"line":1186},89,[114,1188,1189],{"class":398},"# Online only: remove installed copies for every account first. Removing only the\n",[114,1191,1193],{"class":160,"line":1192},90,[114,1194,1195],{"class":398},"# provisioned package leaves existing profiles untouched.\n",[114,1197,1199,1201,1203,1206],{"class":160,"line":1198},91,[114,1200,1090],{"class":168},[114,1202,1102],{"class":172},[114,1204,1205],{"class":168},"-not",[114,1207,1208],{"class":172}," $ImagePath) {\n",[114,1210,1212,1215,1217,1219,1221,1224,1226,1229,1231,1233,1235,1237,1239,1241,1243,1246,1248],{"class":160,"line":1211},92,[114,1213,1214],{"class":172},"    $installed ",[114,1216,610],{"class":168},[114,1218,613],{"class":168},[114,1220,574],{"class":172},[114,1222,1223],{"class":164},"Get-AppxPackage",[114,1225,169],{"class":168},[114,1227,1228],{"class":172},"AllUsers ",[114,1230,227],{"class":168},[114,1232,1052],{"class":164},[114,1234,1055],{"class":172},[114,1236,1058],{"class":164},[114,1238,169],{"class":168},[114,1240,1063],{"class":172},[114,1242,1066],{"class":164},[114,1244,1245],{"class":172},".Name ",[114,1247,221],{"class":168},[114,1249,1250],{"class":172},"Prefix $AppxNamePattern })\n",[114,1252,1254],{"class":160,"line":1253},93,[114,1255,263],{"emptyLinePlaceholder":262},[114,1257,1259,1261,1264,1266],{"class":160,"line":1258},94,[114,1260,844],{"class":168},[114,1262,1263],{"class":172}," ($package ",[114,1265,850],{"class":168},[114,1267,1268],{"class":172}," $installed) {\n",[114,1270,1272,1274,1276,1279,1282,1284,1287],{"class":160,"line":1271},95,[114,1273,859],{"class":168},[114,1275,1102],{"class":172},[114,1277,1278],{"class":164},"$PSCmdlet",[114,1280,1281],{"class":172},".ShouldProcess($package.PackageFullName",[114,1283,189],{"class":168},[114,1285,1286],{"class":176}," \"Remove installed package for all users\"",[114,1288,1289],{"class":172},")) {\n",[114,1291,1293,1296],{"class":160,"line":1292},96,[114,1294,1295],{"class":168},"            try",[114,1297,796],{"class":172},[114,1299,1301,1304,1306,1309,1311,1313,1315],{"class":160,"line":1300},97,[114,1302,1303],{"class":164},"                Remove-AppxPackage",[114,1305,169],{"class":168},[114,1307,1308],{"class":172},"Package $package.PackageFullName ",[114,1310,221],{"class":168},[114,1312,1228],{"class":172},[114,1314,221],{"class":168},[114,1316,1317],{"class":172},"ErrorAction Stop\n",[114,1319,1321,1324,1327,1330,1332,1335,1338],{"class":160,"line":1320},98,[114,1322,1323],{"class":164},"                Write-Host",[114,1325,1326],{"class":176}," \"Removed installed package: ",[114,1328,1329],{"class":168},"$",[114,1331,574],{"class":176},[114,1333,1334],{"class":172},"$package.PackageFullName",[114,1336,1337],{"class":176},")",[114,1339,1340],{"class":176},"\"\n",[114,1342,1344,1347,1350],{"class":160,"line":1343},99,[114,1345,1346],{"class":172},"            } ",[114,1348,1349],{"class":168},"catch",[114,1351,796],{"class":172},[114,1353,1355,1358,1361,1363,1365,1367,1369,1372,1374,1376,1378,1381,1383],{"class":160,"line":1354},100,[114,1356,1357],{"class":164},"                Write-Warning",[114,1359,1360],{"class":176}," \"Could not remove ",[114,1362,1329],{"class":168},[114,1364,574],{"class":176},[114,1366,1334],{"class":172},[114,1368,1337],{"class":176},[114,1370,1371],{"class":176},": ",[114,1373,1329],{"class":168},[114,1375,574],{"class":176},[114,1377,1066],{"class":164},[114,1379,1380],{"class":172},".Exception.Message",[114,1382,1337],{"class":176},[114,1384,1340],{"class":176},[114,1386,1388],{"class":160,"line":1387},101,[114,1389,1390],{"class":172},"            }\n",[114,1392,1394],{"class":160,"line":1393},102,[114,1395,892],{"class":172},[114,1397,1399],{"class":160,"line":1398},103,[114,1400,898],{"class":172},[114,1402,1404],{"class":160,"line":1403},104,[114,1405,918],{"class":172},[114,1407,1409],{"class":160,"line":1408},105,[114,1410,263],{"emptyLinePlaceholder":262},[114,1412,1414,1417,1419,1421,1423,1426,1428],{"class":160,"line":1413},106,[114,1415,1416],{"class":172},"$toRemove ",[114,1418,610],{"class":168},[114,1420,937],{"class":164},[114,1422,169],{"class":168},[114,1424,1425],{"class":172},"ImagePath $ImagePath ",[114,1427,221],{"class":168},[114,1429,1430],{"class":172},"NamePattern $AppxNamePattern\n",[114,1432,1434,1437,1440,1442,1444,1447,1449,1452,1455],{"class":160,"line":1433},107,[114,1435,1436],{"class":164},"Write-Host",[114,1438,1439],{"class":176}," \"Found ",[114,1441,1329],{"class":168},[114,1443,574],{"class":176},[114,1445,1446],{"class":172},"$toRemove.Count",[114,1448,1337],{"class":176},[114,1450,1451],{"class":176}," matching provisioned package(s) in ",[114,1453,1454],{"class":172},"$target",[114,1456,1457],{"class":176},".\"\n",[114,1459,1461],{"class":160,"line":1460},108,[114,1462,263],{"emptyLinePlaceholder":262},[114,1464,1466,1469,1471,1473],{"class":160,"line":1465},109,[114,1467,1468],{"class":168},"foreach",[114,1470,1263],{"class":172},[114,1472,850],{"class":168},[114,1474,1475],{"class":172}," $toRemove) {\n",[114,1477,1479,1481,1483,1485,1488,1490,1493],{"class":160,"line":1478},110,[114,1480,984],{"class":168},[114,1482,1102],{"class":172},[114,1484,1278],{"class":164},[114,1486,1487],{"class":172},".ShouldProcess($package.DisplayName",[114,1489,189],{"class":168},[114,1491,1492],{"class":176}," \"Remove provisioned package\"",[114,1494,1289],{"class":172},[114,1496,1498,1501],{"class":160,"line":1497},111,[114,1499,1500],{"class":168},"        try",[114,1502,796],{"class":172},[114,1504,1506,1509],{"class":160,"line":1505},112,[114,1507,1508],{"class":168},"            if",[114,1510,987],{"class":172},[114,1512,1514,1517,1519,1521,1523,1526,1528,1531,1533],{"class":160,"line":1513},113,[114,1515,1516],{"class":164},"                Remove-AppxProvisionedPackage",[114,1518,169],{"class":168},[114,1520,1118],{"class":172},[114,1522,221],{"class":168},[114,1524,1525],{"class":172},"PackageName $package.PackageName ",[114,1527,221],{"class":168},[114,1529,1530],{"class":172},"ErrorAction Stop ",[114,1532,227],{"class":168},[114,1534,230],{"class":164},[114,1536,1538,1540,1542],{"class":160,"line":1537},114,[114,1539,1346],{"class":172},[114,1541,1012],{"class":168},[114,1543,796],{"class":172},[114,1545,1547,1549,1551,1554,1556,1558,1560,1562,1564],{"class":160,"line":1546},115,[114,1548,1516],{"class":164},[114,1550,169],{"class":168},[114,1552,1553],{"class":172},"Online ",[114,1555,221],{"class":168},[114,1557,1525],{"class":172},[114,1559,221],{"class":168},[114,1561,1530],{"class":172},[114,1563,227],{"class":168},[114,1565,230],{"class":164},[114,1567,1569],{"class":160,"line":1568},116,[114,1570,1390],{"class":172},[114,1572,1574],{"class":160,"line":1573},117,[114,1575,263],{"emptyLinePlaceholder":262},[114,1577,1579,1582,1585,1587,1589,1592,1594],{"class":160,"line":1578},118,[114,1580,1581],{"class":164},"            Write-Host",[114,1583,1584],{"class":176}," \"Removed provisioned package: ",[114,1586,1329],{"class":168},[114,1588,574],{"class":176},[114,1590,1591],{"class":172},"$package.DisplayName",[114,1593,1337],{"class":176},[114,1595,1340],{"class":176},[114,1597,1599,1602,1604],{"class":160,"line":1598},119,[114,1600,1601],{"class":172},"        } ",[114,1603,1349],{"class":168},[114,1605,796],{"class":172},[114,1607,1609,1612,1614,1616,1618,1620,1622,1624,1626,1628,1630,1632,1634],{"class":160,"line":1608},120,[114,1610,1611],{"class":164},"            Write-Warning",[114,1613,1360],{"class":176},[114,1615,1329],{"class":168},[114,1617,574],{"class":176},[114,1619,1591],{"class":172},[114,1621,1337],{"class":176},[114,1623,1371],{"class":176},[114,1625,1329],{"class":168},[114,1627,574],{"class":176},[114,1629,1066],{"class":164},[114,1631,1380],{"class":172},[114,1633,1337],{"class":176},[114,1635,1636],{"class":176}," (see %WINDIR%\\Logs\\Dism\\dism.log)\"\n",[114,1638,1640],{"class":160,"line":1639},121,[114,1641,892],{"class":172},[114,1643,1645],{"class":160,"line":1644},122,[114,1646,898],{"class":172},[114,1648,1650],{"class":160,"line":1649},123,[114,1651,918],{"class":172},[114,1653,1655],{"class":160,"line":1654},124,[114,1656,263],{"emptyLinePlaceholder":262},[114,1658,1660,1663,1665,1667,1669,1671,1673],{"class":160,"line":1659},125,[114,1661,1662],{"class":172},"$remaining ",[114,1664,610],{"class":168},[114,1666,937],{"class":164},[114,1668,169],{"class":168},[114,1670,1425],{"class":172},[114,1672,221],{"class":168},[114,1674,1430],{"class":172},[114,1676,1678,1680,1683,1685,1687,1690,1692],{"class":160,"line":1677},126,[114,1679,1436],{"class":164},[114,1681,1682],{"class":176}," \"Remaining matching provisioned packages: ",[114,1684,1329],{"class":168},[114,1686,574],{"class":176},[114,1688,1689],{"class":172},"$remaining.Count",[114,1691,1337],{"class":176},[114,1693,1340],{"class":176},[114,1695,1697,1699,1701,1704,1707,1709],{"class":160,"line":1696},127,[114,1698,1662],{"class":172},[114,1700,227],{"class":168},[114,1702,1703],{"class":164}," Select-Object",[114,1705,1706],{"class":172}," DisplayName",[114,1708,189],{"class":168},[114,1710,1711],{"class":172}," PackageName\n",[29,1713,1715],{"id":1714},"notes","Notes",[34,1717,1718,1733,1754,1769,1783],{},[37,1719,1720,1723,1724,1728,1729,1732],{},[15,1721,1722],{},"Remove-AppxProvisionedPackage"," only affects accounts created ",[1725,1726,1727],"em",{},"after"," the removal. Microsoft's cmdlet reference is explicit: packages are not removed from existing user accounts; use ",[15,1730,1731],{},"Remove-AppxPackage"," for those. That's why the online path removes the installed copies first.",[37,1734,1735,1736,1739,1740,1743,1744,1743,1747,1743,1750,1753],{},"The ",[15,1737,1738],{},"Microsoft.Xbox"," prefix intentionally covers several packages (",[15,1741,1742],{},"Microsoft.XboxGamingOverlay",", ",[15,1745,1746],{},"Microsoft.XboxIdentityProvider",[15,1748,1749],{},"Microsoft.XboxSpeechToTextOverlay",[15,1751,1752],{},"Microsoft.Xbox.TCUI","). Narrow it if any line-of-business or training app depends on Xbox sign-in.",[37,1755,1756,1757,1760,1761,1764,1765,1768],{},"Some packages are part of the OS rather than provisioned apps and won't appear in ",[15,1758,1759],{},"Get-AppxProvisionedPackage"," at all. Microsoft's app overview lists them with ",[15,1762,1763],{},"Get-AppxPackage -PackageTypeFilter Main"," filtered on ",[15,1766,1767],{},"SignatureKind -eq \"System\"",". Don't chase those with this script.",[37,1770,1771,1772,1775,1776,1779,1780,1782],{},"Always dismount with ",[15,1773,1774],{},"-Save"," to commit. ",[15,1777,1778],{},"-Discard"," throws away everything the script did. ",[15,1781,307],{}," requires one or the other: called with neither, it fails parameter binding and leaves the image mounted.",[37,1784,1785],{},"A Windows feature update that rebuilds the OS can bring inbox apps back on devices that were imaged from a stripped WIM. That's the main argument for the policy below.",[1787,1788,1790],"h3",{"id":1789},"the-policy-alternative-on-windows-11-24h2-and-later","The policy alternative on Windows 11 24H2 and later",[11,1792,1793,1794,1798],{},"On Windows 11, version 24H2 or newer, ",[1795,1796,1797],"strong",{},"Enterprise and Education"," editions support policy-based in-box app removal. It isn't available on Pro or Home, and Microsoft lists multi-session environments as unsupported. Removal runs at OOBE, at the first sign-in after an OS upgrade, and at the first sign-in after the policy changes, and a removed app stays blocked from reinstalling while it's selected. It also survives feature updates, which an image edit doesn't.",[34,1800,1801,1811],{},[37,1802,1803,1806,1807,1810],{},[1795,1804,1805],{},"Group Policy:"," Computer Configuration > Administrative Templates > Windows Components > App Package Deployment > ",[1795,1808,1809],{},"Remove Default Microsoft Store packages from the system"," (requires current Windows 11 ADMX templates). Additional MSIX\u002FAppX apps go in by package family name under \"Specify additional package family names to remove\", one per line.",[37,1812,1813,1816,1817,1820,1821,1824,1825,1828],{},[1795,1814,1815],{},"Intune \u002F MDM:"," the ",[15,1818,1819],{},"RemoveDefaultMicrosoftStorePackages"," setting in the ",[15,1822,1823],{},"ApplicationManagement"," area of the Policy CSP, OMA-URI ",[15,1826,1827],{},".\u002FDevice\u002FVendor\u002FMSFT\u002FPolicy\u002FConfig\u002FApplicationManagement\u002FRemoveDefaultMicrosoftStorePackages",", assigned to device groups.",[11,1830,1831],{},"A custom OMA-URI payload that removes the consumer apps and keeps the tools users actually need looks like this (the IDs are the static list from Microsoft's documentation):",[150,1833,1837],{"className":1834,"code":1835,"language":1836,"meta":155,"style":155},"language-xml shiki shiki-themes github-dark","\u003Cenabled\u002F>\n\u003Cdata id=\"BingNews\" value=\"true\"\u002F>\n\u003Cdata id=\"BingWeather\" value=\"true\"\u002F>\n\u003Cdata id=\"Clipchamp\" value=\"true\"\u002F>\n\u003Cdata id=\"GamingApp\" value=\"true\"\u002F>\n\u003Cdata id=\"MicrosoftSolitaireCollection\" value=\"true\"\u002F>\n\u003Cdata id=\"XboxGamingOverlay\" value=\"true\"\u002F>\n\u003Cdata id=\"XboxIdentityProvider\" value=\"true\"\u002F>\n\u003Cdata id=\"XboxSpeechToTextOverlay\" value=\"true\"\u002F>\n\u003Cdata id=\"XboxTCUI\" value=\"true\"\u002F>\n\u003Cdata id=\"WindowsFeedbackHub\" value=\"true\"\u002F>\n\u003Cdata id=\"MicrosoftOfficeHub\" value=\"false\"\u002F>\n\u003Cdata id=\"Copilot\" value=\"false\"\u002F>\n\u003Cdata id=\"Photos\" value=\"false\"\u002F>\n\u003Cdata id=\"MicrosoftStickyNotes\" value=\"false\"\u002F>\n\u003Cdata id=\"MSTeams\" value=\"false\"\u002F>\n\u003Cdata id=\"Todo\" value=\"false\"\u002F>\n\u003Cdata id=\"OutlookForWindows\" value=\"false\"\u002F>\n\u003Cdata id=\"Paint\" value=\"false\"\u002F>\n\u003Cdata id=\"QuickAssist\" value=\"false\"\u002F>\n\u003Cdata id=\"ScreenSketch\" value=\"false\"\u002F>\n\u003Cdata id=\"WindowsCalculator\" value=\"false\"\u002F>\n\u003Cdata id=\"WindowsCamera\" value=\"false\"\u002F>\n\u003Cdata id=\"MediaPlayer\" value=\"false\"\u002F>\n\u003Cdata id=\"WindowsNotepad\" value=\"false\"\u002F>\n\u003Cdata id=\"WindowsSoundRecorder\" value=\"false\"\u002F>\n\u003Cdata id=\"WindowsTerminal\" value=\"false\"\u002F>\n\u003Cdata id=\"DynamicRemovalList\" value=\"\"\u002F>\n","xml",[15,1838,1839,1851,1876,1897,1918,1939,1960,1981,2002,2023,2044,2065,2087,2108,2129,2150,2171,2192,2213,2234,2255,2276,2297,2318,2339,2360,2381,2402],{"__ignoreMap":155},[114,1840,1841,1844,1848],{"class":160,"line":161},[114,1842,1843],{"class":172},"\u003C",[114,1845,1847],{"class":1846},"s4JwU","enabled",[114,1849,1850],{"class":172},"\u002F>\n",[114,1852,1853,1855,1858,1861,1863,1866,1869,1871,1874],{"class":160,"line":233},[114,1854,1843],{"class":172},[114,1856,1857],{"class":1846},"data",[114,1859,1860],{"class":792}," id",[114,1862,610],{"class":172},[114,1864,1865],{"class":176},"\"BingNews\"",[114,1867,1868],{"class":792}," value",[114,1870,610],{"class":172},[114,1872,1873],{"class":176},"\"true\"",[114,1875,1850],{"class":172},[114,1877,1878,1880,1882,1884,1886,1889,1891,1893,1895],{"class":160,"line":259},[114,1879,1843],{"class":172},[114,1881,1857],{"class":1846},[114,1883,1860],{"class":792},[114,1885,610],{"class":172},[114,1887,1888],{"class":176},"\"BingWeather\"",[114,1890,1868],{"class":792},[114,1892,610],{"class":172},[114,1894,1873],{"class":176},[114,1896,1850],{"class":172},[114,1898,1899,1901,1903,1905,1907,1910,1912,1914,1916],{"class":160,"line":266},[114,1900,1843],{"class":172},[114,1902,1857],{"class":1846},[114,1904,1860],{"class":792},[114,1906,610],{"class":172},[114,1908,1909],{"class":176},"\"Clipchamp\"",[114,1911,1868],{"class":792},[114,1913,610],{"class":172},[114,1915,1873],{"class":176},[114,1917,1850],{"class":172},[114,1919,1920,1922,1924,1926,1928,1931,1933,1935,1937],{"class":160,"line":286},[114,1921,1843],{"class":172},[114,1923,1857],{"class":1846},[114,1925,1860],{"class":792},[114,1927,610],{"class":172},[114,1929,1930],{"class":176},"\"GamingApp\"",[114,1932,1868],{"class":792},[114,1934,610],{"class":172},[114,1936,1873],{"class":176},[114,1938,1850],{"class":172},[114,1940,1941,1943,1945,1947,1949,1952,1954,1956,1958],{"class":160,"line":299},[114,1942,1843],{"class":172},[114,1944,1857],{"class":1846},[114,1946,1860],{"class":792},[114,1948,610],{"class":172},[114,1950,1951],{"class":176},"\"MicrosoftSolitaireCollection\"",[114,1953,1868],{"class":792},[114,1955,610],{"class":172},[114,1957,1873],{"class":176},[114,1959,1850],{"class":172},[114,1961,1962,1964,1966,1968,1970,1973,1975,1977,1979],{"class":160,"line":304},[114,1963,1843],{"class":172},[114,1965,1857],{"class":1846},[114,1967,1860],{"class":792},[114,1969,610],{"class":172},[114,1971,1972],{"class":176},"\"XboxGamingOverlay\"",[114,1974,1868],{"class":792},[114,1976,610],{"class":172},[114,1978,1873],{"class":176},[114,1980,1850],{"class":172},[114,1982,1983,1985,1987,1989,1991,1994,1996,1998,2000],{"class":160,"line":436},[114,1984,1843],{"class":172},[114,1986,1857],{"class":1846},[114,1988,1860],{"class":792},[114,1990,610],{"class":172},[114,1992,1993],{"class":176},"\"XboxIdentityProvider\"",[114,1995,1868],{"class":792},[114,1997,610],{"class":172},[114,1999,1873],{"class":176},[114,2001,1850],{"class":172},[114,2003,2004,2006,2008,2010,2012,2015,2017,2019,2021],{"class":160,"line":442},[114,2005,1843],{"class":172},[114,2007,1857],{"class":1846},[114,2009,1860],{"class":792},[114,2011,610],{"class":172},[114,2013,2014],{"class":176},"\"XboxSpeechToTextOverlay\"",[114,2016,1868],{"class":792},[114,2018,610],{"class":172},[114,2020,1873],{"class":176},[114,2022,1850],{"class":172},[114,2024,2025,2027,2029,2031,2033,2036,2038,2040,2042],{"class":160,"line":448},[114,2026,1843],{"class":172},[114,2028,1857],{"class":1846},[114,2030,1860],{"class":792},[114,2032,610],{"class":172},[114,2034,2035],{"class":176},"\"XboxTCUI\"",[114,2037,1868],{"class":792},[114,2039,610],{"class":172},[114,2041,1873],{"class":176},[114,2043,1850],{"class":172},[114,2045,2046,2048,2050,2052,2054,2057,2059,2061,2063],{"class":160,"line":459},[114,2047,1843],{"class":172},[114,2049,1857],{"class":1846},[114,2051,1860],{"class":792},[114,2053,610],{"class":172},[114,2055,2056],{"class":176},"\"WindowsFeedbackHub\"",[114,2058,1868],{"class":792},[114,2060,610],{"class":172},[114,2062,1873],{"class":176},[114,2064,1850],{"class":172},[114,2066,2067,2069,2071,2073,2075,2078,2080,2082,2085],{"class":160,"line":465},[114,2068,1843],{"class":172},[114,2070,1857],{"class":1846},[114,2072,1860],{"class":792},[114,2074,610],{"class":172},[114,2076,2077],{"class":176},"\"MicrosoftOfficeHub\"",[114,2079,1868],{"class":792},[114,2081,610],{"class":172},[114,2083,2084],{"class":176},"\"false\"",[114,2086,1850],{"class":172},[114,2088,2089,2091,2093,2095,2097,2100,2102,2104,2106],{"class":160,"line":475},[114,2090,1843],{"class":172},[114,2092,1857],{"class":1846},[114,2094,1860],{"class":792},[114,2096,610],{"class":172},[114,2098,2099],{"class":176},"\"Copilot\"",[114,2101,1868],{"class":792},[114,2103,610],{"class":172},[114,2105,2084],{"class":176},[114,2107,1850],{"class":172},[114,2109,2110,2112,2114,2116,2118,2121,2123,2125,2127],{"class":160,"line":481},[114,2111,1843],{"class":172},[114,2113,1857],{"class":1846},[114,2115,1860],{"class":792},[114,2117,610],{"class":172},[114,2119,2120],{"class":176},"\"Photos\"",[114,2122,1868],{"class":792},[114,2124,610],{"class":172},[114,2126,2084],{"class":176},[114,2128,1850],{"class":172},[114,2130,2131,2133,2135,2137,2139,2142,2144,2146,2148],{"class":160,"line":487},[114,2132,1843],{"class":172},[114,2134,1857],{"class":1846},[114,2136,1860],{"class":792},[114,2138,610],{"class":172},[114,2140,2141],{"class":176},"\"MicrosoftStickyNotes\"",[114,2143,1868],{"class":792},[114,2145,610],{"class":172},[114,2147,2084],{"class":176},[114,2149,1850],{"class":172},[114,2151,2152,2154,2156,2158,2160,2163,2165,2167,2169],{"class":160,"line":495},[114,2153,1843],{"class":172},[114,2155,1857],{"class":1846},[114,2157,1860],{"class":792},[114,2159,610],{"class":172},[114,2161,2162],{"class":176},"\"MSTeams\"",[114,2164,1868],{"class":792},[114,2166,610],{"class":172},[114,2168,2084],{"class":176},[114,2170,1850],{"class":172},[114,2172,2173,2175,2177,2179,2181,2184,2186,2188,2190],{"class":160,"line":501},[114,2174,1843],{"class":172},[114,2176,1857],{"class":1846},[114,2178,1860],{"class":792},[114,2180,610],{"class":172},[114,2182,2183],{"class":176},"\"Todo\"",[114,2185,1868],{"class":792},[114,2187,610],{"class":172},[114,2189,2084],{"class":176},[114,2191,1850],{"class":172},[114,2193,2194,2196,2198,2200,2202,2205,2207,2209,2211],{"class":160,"line":508},[114,2195,1843],{"class":172},[114,2197,1857],{"class":1846},[114,2199,1860],{"class":792},[114,2201,610],{"class":172},[114,2203,2204],{"class":176},"\"OutlookForWindows\"",[114,2206,1868],{"class":792},[114,2208,610],{"class":172},[114,2210,2084],{"class":176},[114,2212,1850],{"class":172},[114,2214,2215,2217,2219,2221,2223,2226,2228,2230,2232],{"class":160,"line":514},[114,2216,1843],{"class":172},[114,2218,1857],{"class":1846},[114,2220,1860],{"class":792},[114,2222,610],{"class":172},[114,2224,2225],{"class":176},"\"Paint\"",[114,2227,1868],{"class":792},[114,2229,610],{"class":172},[114,2231,2084],{"class":176},[114,2233,1850],{"class":172},[114,2235,2236,2238,2240,2242,2244,2247,2249,2251,2253],{"class":160,"line":522},[114,2237,1843],{"class":172},[114,2239,1857],{"class":1846},[114,2241,1860],{"class":792},[114,2243,610],{"class":172},[114,2245,2246],{"class":176},"\"QuickAssist\"",[114,2248,1868],{"class":792},[114,2250,610],{"class":172},[114,2252,2084],{"class":176},[114,2254,1850],{"class":172},[114,2256,2257,2259,2261,2263,2265,2268,2270,2272,2274],{"class":160,"line":528},[114,2258,1843],{"class":172},[114,2260,1857],{"class":1846},[114,2262,1860],{"class":792},[114,2264,610],{"class":172},[114,2266,2267],{"class":176},"\"ScreenSketch\"",[114,2269,1868],{"class":792},[114,2271,610],{"class":172},[114,2273,2084],{"class":176},[114,2275,1850],{"class":172},[114,2277,2278,2280,2282,2284,2286,2289,2291,2293,2295],{"class":160,"line":534},[114,2279,1843],{"class":172},[114,2281,1857],{"class":1846},[114,2283,1860],{"class":792},[114,2285,610],{"class":172},[114,2287,2288],{"class":176},"\"WindowsCalculator\"",[114,2290,1868],{"class":792},[114,2292,610],{"class":172},[114,2294,2084],{"class":176},[114,2296,1850],{"class":172},[114,2298,2299,2301,2303,2305,2307,2310,2312,2314,2316],{"class":160,"line":540},[114,2300,1843],{"class":172},[114,2302,1857],{"class":1846},[114,2304,1860],{"class":792},[114,2306,610],{"class":172},[114,2308,2309],{"class":176},"\"WindowsCamera\"",[114,2311,1868],{"class":792},[114,2313,610],{"class":172},[114,2315,2084],{"class":176},[114,2317,1850],{"class":172},[114,2319,2320,2322,2324,2326,2328,2331,2333,2335,2337],{"class":160,"line":546},[114,2321,1843],{"class":172},[114,2323,1857],{"class":1846},[114,2325,1860],{"class":792},[114,2327,610],{"class":172},[114,2329,2330],{"class":176},"\"MediaPlayer\"",[114,2332,1868],{"class":792},[114,2334,610],{"class":172},[114,2336,2084],{"class":176},[114,2338,1850],{"class":172},[114,2340,2341,2343,2345,2347,2349,2352,2354,2356,2358],{"class":160,"line":551},[114,2342,1843],{"class":172},[114,2344,1857],{"class":1846},[114,2346,1860],{"class":792},[114,2348,610],{"class":172},[114,2350,2351],{"class":176},"\"WindowsNotepad\"",[114,2353,1868],{"class":792},[114,2355,610],{"class":172},[114,2357,2084],{"class":176},[114,2359,1850],{"class":172},[114,2361,2362,2364,2366,2368,2370,2373,2375,2377,2379],{"class":160,"line":560},[114,2363,1843],{"class":172},[114,2365,1857],{"class":1846},[114,2367,1860],{"class":792},[114,2369,610],{"class":172},[114,2371,2372],{"class":176},"\"WindowsSoundRecorder\"",[114,2374,1868],{"class":792},[114,2376,610],{"class":172},[114,2378,2084],{"class":176},[114,2380,1850],{"class":172},[114,2382,2383,2385,2387,2389,2391,2394,2396,2398,2400],{"class":160,"line":565},[114,2384,1843],{"class":172},[114,2386,1857],{"class":1846},[114,2388,1860],{"class":792},[114,2390,610],{"class":172},[114,2392,2393],{"class":176},"\"WindowsTerminal\"",[114,2395,1868],{"class":792},[114,2397,610],{"class":172},[114,2399,2084],{"class":176},[114,2401,1850],{"class":172},[114,2403,2404,2406,2408,2410,2412,2415,2417,2419,2422],{"class":160,"line":590},[114,2405,1843],{"class":172},[114,2407,1857],{"class":1846},[114,2409,1860],{"class":792},[114,2411,610],{"class":172},[114,2413,2414],{"class":176},"\"DynamicRemovalList\"",[114,2416,1868],{"class":792},[114,2418,610],{"class":172},[114,2420,2421],{"class":176},"\"\"",[114,2423,1850],{"class":172},[11,2425,2426],{},"To confirm a device got the policy and see what it did, check the registry key it writes and the AppX deployment log. Event 606 records packages removed at first sign-in after OOBE, 614 records failed removals, and 762 records a blocked reinstall attempt:",[150,2428,2430],{"className":152,"code":2429,"language":154,"meta":155,"style":155},"Get-Item -Path \"HKLM:\\SOFTWARE\\Policies\\Microsoft\\Windows\\Appx\\RemoveDefaultMicrosoftStorePackages\"\n\n# Resolve the AppxDeployment-Server Operational channel, then pull the policy events.\n$log = Get-WinEvent -ListLog \"*AppXDeployment*\" | Where-Object { $_.LogName -like \"*Operational\" } | Select-Object -First 1\nGet-WinEvent -FilterHashtable @{ LogName = $log.LogName; Id = 606, 614, 762 } -ErrorAction SilentlyContinue |\n    Select-Object TimeCreated, Id, Message\n",[15,2431,2432,2444,2448,2453,2502,2548],{"__ignoreMap":155},[114,2433,2434,2437,2439,2441],{"class":160,"line":161},[114,2435,2436],{"class":164},"Get-Item",[114,2438,169],{"class":168},[114,2440,210],{"class":172},[114,2442,2443],{"class":176},"\"HKLM:\\SOFTWARE\\Policies\\Microsoft\\Windows\\Appx\\RemoveDefaultMicrosoftStorePackages\"\n",[114,2445,2446],{"class":160,"line":233},[114,2447,263],{"emptyLinePlaceholder":262},[114,2449,2450],{"class":160,"line":259},[114,2451,2452],{"class":398},"# Resolve the AppxDeployment-Server Operational channel, then pull the policy events.\n",[114,2454,2455,2458,2460,2463,2465,2468,2471,2473,2475,2477,2479,2482,2484,2487,2490,2492,2494,2496,2499],{"class":160,"line":266},[114,2456,2457],{"class":172},"$log ",[114,2459,610],{"class":168},[114,2461,2462],{"class":164}," Get-WinEvent",[114,2464,169],{"class":168},[114,2466,2467],{"class":172},"ListLog ",[114,2469,2470],{"class":176},"\"*AppXDeployment*\"",[114,2472,180],{"class":168},[114,2474,1052],{"class":164},[114,2476,1055],{"class":172},[114,2478,1066],{"class":164},[114,2480,2481],{"class":172},".LogName ",[114,2483,865],{"class":168},[114,2485,2486],{"class":176}," \"*Operational\"",[114,2488,2489],{"class":172}," } ",[114,2491,227],{"class":168},[114,2493,1703],{"class":164},[114,2495,169],{"class":168},[114,2497,2498],{"class":172},"First ",[114,2500,2501],{"class":164},"1\n",[114,2503,2504,2507,2509,2512,2515,2518,2520,2523,2525,2528,2530,2533,2535,2538,2540,2542,2545],{"class":160,"line":286},[114,2505,2506],{"class":164},"Get-WinEvent",[114,2508,169],{"class":168},[114,2510,2511],{"class":172},"FilterHashtable ",[114,2513,2514],{"class":168},"@",[114,2516,2517],{"class":172},"{ LogName ",[114,2519,610],{"class":168},[114,2521,2522],{"class":172}," $log.LogName; Id ",[114,2524,610],{"class":168},[114,2526,2527],{"class":164}," 606",[114,2529,189],{"class":168},[114,2531,2532],{"class":164}," 614",[114,2534,189],{"class":168},[114,2536,2537],{"class":164}," 762",[114,2539,2489],{"class":172},[114,2541,221],{"class":168},[114,2543,2544],{"class":172},"ErrorAction SilentlyContinue ",[114,2546,2547],{"class":168},"|\n",[114,2549,2550,2553,2556,2558,2561,2563],{"class":160,"line":299},[114,2551,2552],{"class":164},"    Select-Object",[114,2554,2555],{"class":172}," TimeCreated",[114,2557,189],{"class":168},[114,2559,2560],{"class":172}," Id",[114,2562,189],{"class":168},[114,2564,2565],{"class":172}," Message\n",[11,2567,2568],{},"Two caveats from the documentation. Don't configure it through both Intune and GPO on the same device, because whichever arrives last wins. And unselecting an app doesn't reinstall it: you have to reprovision it from the Store, media, or your deployment tool.",[29,2570,2572],{"id":2571},"source","Source",[34,2574,2575,2582,2588,2594,2604,2611,2618],{},[37,2576,2577],{},[23,2578,1722],{"href":2579,"rel":2580},"https:\u002F\u002Flearn.microsoft.com\u002Fen-us\u002Fpowershell\u002Fmodule\u002Fdism\u002Fremove-appxprovisionedpackage",[2581],"nofollow",[37,2583,2584],{},[23,2585,1759],{"href":2586,"rel":2587},"https:\u002F\u002Flearn.microsoft.com\u002Fen-us\u002Fpowershell\u002Fmodule\u002Fdism\u002Fget-appxprovisionedpackage",[2581],[37,2589,2590],{},[23,2591,1731],{"href":2592,"rel":2593},"https:\u002F\u002Flearn.microsoft.com\u002Fen-us\u002Fpowershell\u002Fmodule\u002Fappx\u002Fremove-appxpackage",[2581],[37,2595,2596,43,2600],{},[23,2597,17],{"href":2598,"rel":2599},"https:\u002F\u002Flearn.microsoft.com\u002Fen-us\u002Fpowershell\u002Fmodule\u002Fdism\u002Fmount-windowsimage",[2581],[23,2601,307],{"href":2602,"rel":2603},"https:\u002F\u002Flearn.microsoft.com\u002Fen-us\u002Fpowershell\u002Fmodule\u002Fdism\u002Fdismount-windowsimage",[2581],[37,2605,2606],{},[23,2607,2610],{"href":2608,"rel":2609},"https:\u002F\u002Flearn.microsoft.com\u002Fen-us\u002Ftroubleshoot\u002Fwindows-client\u002Fsetup-upgrade-and-drivers\u002Fsysprep-fails-remove-or-update-store-apps",[2581],"Sysprep fails with Microsoft Store apps (KB 2769827)",[37,2612,2613],{},[23,2614,2617],{"href":2615,"rel":2616},"https:\u002F\u002Flearn.microsoft.com\u002Fen-us\u002Fwindows\u002Fconfiguration\u002Fpolicy-based-inbox-app-removal\u002Fpolicy-based-inbox-app-removal",[2581],"Policy-based in-box app removal",[37,2619,2620],{},[23,2621,2624],{"href":2622,"rel":2623},"https:\u002F\u002Flearn.microsoft.com\u002Fen-us\u002Fwindows\u002Fapplication-management\u002Foverview-windows-apps",[2581],"Overview of apps on Windows client devices",[2626,2627,2628],"style",{},"html pre.shiki code .sDLfK, html code.shiki .sDLfK{--shiki-default:#79B8FF}html pre.shiki code .snl16, html code.shiki .snl16{--shiki-default:#F97583}html pre.shiki code .s95oV, html code.shiki .s95oV{--shiki-default:#E1E4E8}html pre.shiki code .sU2Wk, html code.shiki .sU2Wk{--shiki-default:#9ECBFF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html pre.shiki code .sAwPA, html code.shiki .sAwPA{--shiki-default:#6A737D}html pre.shiki code .s9osk, html code.shiki .s9osk{--shiki-default:#FFAB70}html pre.shiki code .svObZ, html code.shiki .svObZ{--shiki-default:#B392F0}html pre.shiki code .s4JwU, html code.shiki .s4JwU{--shiki-default:#85E89D}",{"title":155,"searchDepth":233,"depth":233,"links":2630},[2631,2632,2633,2634,2635,2638],{"id":31,"depth":233,"text":32},{"id":75,"depth":233,"text":76},{"id":141,"depth":233,"text":142},{"id":387,"depth":233,"text":388},{"id":1714,"depth":233,"text":1715,"children":2636},[2637],{"id":1789,"depth":259,"text":1790},{"id":2571,"depth":233,"text":2572},"techcolumnist",[2641,2642],"ps","scripts","2025-11-05T14:00:00Z","A PowerShell script that removes provisioned apps from a mounted Windows 11 WIM or a running system, plus the Windows 11 24H2+ policy that does it natively.","md",false,null,{},"\u002Fblog\u002F2025\u002F11\u002F05\u002Fpowershell-windows-11-strip-preinstalled-apps-from-a-deployment-image",{"title":6,"description":2644},[2639],"blog\u002F2025\u002F11\u002F05\u002Fpowershell-windows-11-strip-preinstalled-apps-from-a-deployment-image",[154,2654,2655,2656,2657],"windows-11","debloat","gpo","intune","\u002F2025\u002F11\u002F05\u002Fpowershell-windows-11-strip-preinstalled-apps-from-a-deployment-image\u002F","HtDRVJhY8favJm9pSeT55XU9aCgwKAt5w7mI_D4OHwg",{"title":2661,"description":2662,"date":2663,"url":2664,"categories":2665,"tags":2666,"image":2647,"readingTime":286,"canonical":2639,"sites":2668,"series":2647,"seriesOrder":2647},"PowerShell: SCOM – Alert When a Custom Event Log Source Goes Silent","A PowerShell watchdog that writes SCOM-ready silent and recovered events when a custom application stops logging, with the unit monitor to catch them.","2025-11-12T14:00:00Z","\u002F2025\u002F11\u002F12\u002Fpowershell-scom-alert-when-a-custom-event-log-source-goes-silent\u002F",[2641,2642],[154,2667],"scom",[2639],{"title":2670,"description":2671,"date":2672,"url":2673,"categories":2674,"tags":2675,"image":2647,"readingTime":259,"canonical":2639,"sites":2676,"series":2647,"seriesOrder":2647},"PowerShell: Intune – Force Compliance Re-Evaluation Fleet-Wide","A Microsoft Graph PowerShell script that sends the syncDevice action to every matching Intune-managed device, throttled, so compliance is re-evaluated at once.","2025-10-22T14:00:00Z","\u002F2025\u002F10\u002F22\u002Fpowershell-intune-force-a-compliance-policy-re-evaluation-fleet-wide\u002F",[2641,2642],[154,2657],[2639],[2678,2685,2669],{"title":2679,"description":2680,"date":2681,"url":25,"categories":2682,"tags":2683,"image":2647,"readingTime":266,"canonical":2639,"sites":2684,"series":2647,"seriesOrder":2647},"PowerShell: Windows 11 – Debloat a Golden Image Before Sysprep","A PowerShell script that removes consumer AppX packages for all users and from provisioning, sets consumer-experience policies, and keeps Sysprep from failing.","2025-07-16T14:00:00Z",[2641,2642],[154,2654,2655],[2639],{"title":2686,"description":2687,"date":2688,"url":2689,"categories":2690,"tags":2692,"image":2647,"readingTime":436,"canonical":2639,"sites":2693,"series":2647,"seriesOrder":2647},"Windows 11: A Debloat and Hardening Baseline for New Deployments","A repeatable Windows 11 baseline: policy-based app removal, Microsoft security baselines, BitLocker, Defender and ASR settings, plus a fleet audit script.","2026-06-17T14:00:00Z","\u002F2026\u002F06\u002F17\u002Fwindows-11-a-debloat-and-hardening-baseline-for-new-deployments\u002F",[2691],"engineering",[2654,2655,2656,2657],[2639],{"doc":2647,"posts":2695},[],1790052513215]