The Import Desktop wizard has an option for removing most of the Windows Store apps from the non-multi-session Microsoft Windows 10 or 11 client-type operating systems on the base virtual machine (VM). With that option selected, the image creation process results in a VM that avoids many of the typical reasons for the image publishing process to fail. Use that option especially to reduce the risk of Sysprep errors from occurring during the publishing process.

Note: Even when the wizard's Remove Windows Store Apps toggle is enabled, the system retains some appx packages by default, based on a system-defined allowed list implemented in the system. The appx packages on this allowed list remain installed in the base VM at the end of the import VM process. For this list of appx packages, see the section at the bottom of this topic.

For creating a VM with a Microsoft Windows 10 or 11 operating system, the automated image creation process uses the versions that are available in the Microsoft Azure Marketplace. As described in the Microsoft documentation at Understand the different apps included in Windows 10, Microsoft Windows 10 client-type systems typically include installed Windows apps and provisioned Windows apps, installed in the directory c:\Program Files\WindowsApps. In addition to those apps that are pre-installed in that directory, after the operating system is up and running, it will also silently automatically download from the Microsoft Store and install various Microsoft Store Apps that Microsoft calls suggested apps. Almost all of these apps can cause issues with the Microsoft System Preparation (Sysprep) utility. The publishing workflow depends on that utility. The Sysprep issues that typically result if many of these Windows apps remain in the VM's operating system are industry known, described in the following Microsoft resources:

Removing most of these pre-installed Microsoft Store apps and preventing the VM's operating system from automatically and silently installing new suggested ones aims to reduce the risk of such Sysprep issues from occurring when you publish the image. These Windows apps exist as AppX packages in the operating system. When the option to remove Windows Store apps is selected, the image creation process makes the following changes in the VM's operating system.

  • Configures these registry values to deactivate the Microsoft Store automatic download and the Microsoft Consumer Experience.
    Table 1. Registry values set for the Remove Windows Store Apps option
    Registry Path Property Name Value Details
    HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsStore AutoDownload 2 Deactivates automatic download of Windows Store apps
    HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\CloudContent DisableWindowsConsumerFeatures 1 Deactivates the Microsoft Consumer Experience
    HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager SilentInstalledAppsEnabled 0 Deactivates the automatic installation of suggested Microsoft Stores apps that Microsoft Windows will otherwise silently and automatically download and install
  • Stops and deactivates the Microsoft Store Install Service (InstallService service).
  • Removes the AppX packages (files with extension .appx) that are installed in the VM's operating system and which are not on the system-defined allowed list. The image creation script first gets the names of the AppX packages that are in the VM's operating system using a command similar to:
    Get-AppxPackage -AllUsers | Select-Object -Property Name, PackageFullName | Sort-Object -Property Name
    
    Then for each AppX package that is not in the system's allowed list, the script removes the excluded AppX package using commands similar to:
    Remove-AppxPackage  -Name appx-name
    
    Then the script also removes the application-provisioning packages associated with each excluded AppX package using commands similar to:
    Get-AppxProvisionedPackage -Online | Where-Object {$_.DisplayName -like appx-name} | Remove-AppxProvisionedPackage -Online
    

System-Defined Allowed AppX Packages

The following AppX packages are in the system's allowed list by default. They remain in the resulting base VM at the end of the import VM process, even when the Remove Windows Store Apps toggle is enabled.

Microsoft.DesktopAppInstallers
Microsoft.Messaging
Microsoft.MSPaint
Microsoft.Windows.Photos
Microsoft.MicrosoftStickyNotes
Microsoft.WindowsCalculator
Microsoft.WindowsCommunicationsApps
Microsoft.WindowsSoundRecorder
Microsoft.WindowsStore
Microsoft.Xbox.TCUI
Microsoft.XboxApp
Microsoft.XboxGameCallableUI
Microsoft.XboxGameOverlay
Microsoft.XboxGamingOverlay
Microsoft.XboxIdentityProvider
Microsoft.XboxSpeechToTextOverlay
Windows.CBSPreview
windows.immersivecontrolpanel
Windows.PrintDialog