Skip to content

Remove-AppxApps.ps1 Error Handling for System Apps that are not on the Default list #80

@nathanmaslin

Description

@nathanmaslin

Describe the bug
When running the Remove-AppxApps.ps1 as part of the Install-Defaults.ps1 process during Autopilot OOBE on a Microsoft Surface Laptop, 7th Edition, the script crashed out on the following packages:

WindowsWorkload.Manager.1_1.2511.1196.0_arm64__8wekyb3d8bbwe
WindowsWorkload.Manager.1_1.2511.1196.0_arm64__8wekyb3d8bbwe

These appear to be related to the NPU management on the device, but I am not certain. Based on the errors below, they appear to be system-related apps and cannot be removed.

These packages failed to uninstall, which caused the Remove-AppxApps.ps1 and the main Install-Defaults.ps1 to crash.

The errors below were not logged in the WindowsDefaults log in C:\ProgramData\Microsoft\IntuneManagementExtension\Logs. I ran the script manually, which displayed the errors in the console and added those packages to the SafePackageWildCard array, resolving the issue. The script now runs to completion without error again.

Since it will be next to impossible to predict which system apps various OEMs will add to their hardware, can the script's error handling be improved so that these applications don't completely crash the script in the future?

Thankyou!

Environment (please complete the following information):

  • OS - Windows 11 25H2 (ARM64)
  • Version - 10.0.26200
  • Hardware - Microsoft Surface Laptop, 7th Edition

Additional context
Console output of the errors for further details

Package Errors.txt

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions