App Package (.appx) Servicing Command-Line Options
Published: April 25, 2013
Updated: May 31, 2012
Applies To: Windows 8, Windows Server 2012
You can use app package-servicing commands to add, remove, and list provisioned app packages (.appx) in a Windows image. Provisioned app packages are added to a Windows image and are then installed for every new or existing user profile the next time the user logs on. For more information, including requirements for app package provisioning, see How to Add and Remove Apps.
You can also use Windows PowerShell to add, remove, and list app packages (.appx) per image or per user in a Windows installation. For more information, see Deployment Imaging Servicing Management (DISM) Cmdlets in Windows PowerShell and App Installation Cmdlets in Windows PowerShell.
The base syntax for servicing a Windows image using DISM is:
DISM.exe {/Image:<path_to_image_directory> | /Online} [dism_global_options] {servicing_option} [<servicing_argument>]
The following app package (.appx) servicing options are available for an offline image.
DISM.exe /Image:<path_to_image_directory> [/Get-ProvisionedAppxPackages | / Add-ProvisionedAppxPackage | /Remove-ProvisionedAppxPackage]
The following app package (.appx) servicing options are available for a running operating system.
DISM.exe /Online [/Get-ProvisionedAppxPackages | / Add-ProvisionedAppxPackage | /Remove-ProvisionedAppxPackage]
The following table provides a description of how each app servicing option can be used. These options are not case sensitive.
| Option/Argument | Description | ||
|---|---|---|---|
|
Option: /Get-Help /? |
When used immediately after an app package servicing command-line option, information about the option and the arguments is displayed. Additional topics might become available when an image is specified. Examples: Dism /image:C:\test\offline /Add- ProvisionedAppxPackages /? Dism /online /Get-ProvisionedAppxPackages /? |
||
|
Option: /Get-ProvisionedAppxPackages |
Displays information about app packages in an image that are set to install for each new user. Dism /Image:C:\test\offline /Get-ProvisionedAppxPackages |
||
|
Option: /Add-ProvisionedAppxPackage Arguments: /FolderPath:<App_folder_path> [/SkipLicense] [/CustomDataPath:<custom_file_path>] /PackagePath:<main_package_path> [/DependencyPackagePath:<dependency_package_path>] [/LicenseFile:<license_file_path>] [/SkipLicense] [/CustomDataPath:<custom_file_path>] |
Adds one or more app packages to the image. The app will be added to the Windows image and registered for each existing or new user profile the next time the user logs in. If the app is added to an online image, the app will not be registered for the current user until the next time the user logs in. Use /FolderPath to specify a folder of unpacked app files containing a main package, any dependency packages, and the license file. Use /PackagePath to specify an app package (.appx). You can use /PackagePath when provisioning a line-of-business app online. To use the /PackagePath argument, the host PC must be running Windows® 8. /PackagePath is not supported from a host PC that is running Windows® Preinstallation Environment (Windows PE) 4.0, Windows Server® 2012, or an earlier version of Windows. If the package has dependencies that are architecture-specific, you must install all of the applicable architectures for the dependency on the target image. For example, on an x64 target image, include a path to both the x86 and x64 dependency packages or include them both in the folder of unpacked app files. Use /CustomDataPath to specify an optional custom data file for an app. You can specify any file name. The file will be renamed to Custom.dat when it is added to the image. Use /LicensePath with the /PackagePath option to specify the location of the .xml file containing your application license. Only use /SkipLicense with apps that do not require a license on a sideloading-enabled computer. Using /SkipLicense in other scenarios can compromise an image. Examples: Dism /Image:C:\test\offline /Add-ProvisionedAppxPackage /FolderPath:c:\Test\Apps\MyUnpackedApp /CustomDataPath:c:\Test\Apps\CustomData.xml Dism /Online /Add-ProvisionedAppxPackage /PackagePath:C:\Test\Apps\MyPackedApp\MainPackage.appx /DependencyPackagePath:C:\Test\Apps\MyPackedApp\Framework-x86.appx /DependencyPackagePath:C:\Test\Apps\MyPackedApp\Framework-x64.appx /LicensePath:C:\Test\Apps\MyLicense.xml Dism /Image:C:\test\offline /Add-ProvisionedAppxPackage /FolderPath:C:\Test\Apps\MyUnpackedApp /SkipLicense Dism /Online /Add-ProvisionedAppxPackage /PackagePath:C:\Test\Apps\MyPackedApp\MainPackage.appx /SkipLicense |
||
|
Option: /Remove-ProvisionedAppxPackage Argument: /PackageName:<PackageName> |
Removes provisioning for app packages. App packages (.appx) will not be registered to new user accounts that are created.
To remove app packages from a Windows Server® 2012 image that has the Desktop Experience installed, you must remove the app packages before you remove the Desktop Experience. The Desktop Experience is a requirement of the /Remove-ProvisionedAppxPackage option for Server Core installations of Windows Server 2012. Examples: Dism /Image:C:\test\offline /Remove-ProvisionedAppxPackage /PackageName:microsoft.devx.appx.app1_1.0.0.0_neutral_en-us_ac4zc6fex2zjp |
-
You cannot install an app package (.appx) on an operating system that does not support Windows® 8 apps. Apps are not supported on Server Core installations of Windows Server® 2012, Windows® Preinstallation Environment (Windows PE) 4.0, or on any versions of Windows older than Windows® 8 and Windows Server® 2012.
To install and run apps on Windows Server 2012, you must install the Desktop Experience. -
The /PackagePath option is only supported for offline servicing when the technician computer is running a version of Windows that supports Windows 8 apps.

Important