COMMAND EVERYTHING.
Adds a signed app package to a user account.
Microsoft Appx reference: Adds a signed app package to a user account. The syntax and selected example below are adapted from the pinned Windows Server 2025 reference. Module availability, target configuration and delegated permissions determine whether it can run in your environment. Documentation and parameter text: Microsoft, CC BY 4.0; formatting adapted by Cmdlet World. No execution testing is claimed.
Use an account with the target resource permissions documented for Add-AppxPackage. Modifying administrative cmdlets may require elevation or delegated administration. This catalog does not assert that ordinary users can execute the command.
Windows / Appx · Windows Server 2025 documentation; feature/module prerequisites apply
-AllowUnsigned- Allows adding an unsigned package.
-AppInstallerFile (required)- Runs an appinstaller file and allows the user to install all the defined packages with a single click. For more information, see Create an App Installer file manually.
-Confirm- Prompts you for confirmation before running the cmdlet.
-DeferRegistrationWhenPackagesAreInUse- Specifies that the app won't register for a user if currently in use. The app will update on the next launch.
-DependencyPackages- Specifies the dependency package full name or dependency package bundle full name to be registered.
-DependencyPath- Specifies an array of file paths of dependency packages that are required for the installation of the app package. The app package has an .msix, .appx, .msixbundle, or .appxbundle filename extension. You can specify the paths to more than one dependency package. If a package is already installed for a user, you can skip adding it to the DependencyPath.
-DisableDevelopmentMode- Indicates that this cmdlet registers an existing app package installation that has been disabled, didn't register, or has become corrupted. Use the current parameter to specify that the manifest is from an existing installation, and not from a collection of files in development mode. You can also use this parameter to register an application that the Package Manager API has staged. Use the Register parameter to specify the location of the app package manifest .xml file from the installation location.
-ExternalLocation- URI path of an external disk location outside of the MSIX package where the package manifest can reference application content.
-ExternalPackages- Specifies an array of optional packages that must be installed along with the app package. It's an atomic operation, which means that if the app or its optional packages fail to install, the deployment operation will be aborted.
-ForceApplicationShutdown- Indicates that this cmdlet forces all active processes associated with the package or its dependencies to shut down. If you specify this parameter, don't specify the ForceTargetApplicationShutdown parameter.
-ForceTargetApplicationShutdown- Indicates that this cmdlet forces all active processes associated with the package to shut down. If you specify this parameter, don't specify the ForceApplicationShutdown parameter.
-ForceUpdateFromAnyVersion- This parameter is used to force a specific version of a package to be staged or registered, regardless of whether a higher version is already staged or registered.
-InstallAllResources- Indicates that this cmdlet forces the deployment of all resource packages specified from a bundle argument. This overrides the resource applicability check of the deployment engine and forces staging of all resource packages, registration of all resource packages, or staging and registration of all resource packages. This parameter can only be used when specifying a resource bundle or resource bundle manifest.
-LimitToExistingPackages- This parameter is used to prevent missing referenced packages to be downloaded.
-MainPackage (required)- Specifies the main package full name or bundle full name to register.
-OptionalPackages- Specifies the PackageFamilyName of the optional packages that are in a related set that need to be installed along with the app. Unlike the external packages flag, you don't need to pass in a path to the optional packages. It's an atomic operation, which means that if the app or its optional packages fail to install, the deployment operation will be aborted.
-Path (required)- Specifies the path to the app package file. An app package has an .msix, .appx, .msixbundle, or .appxbundle filename extension.
-Register (required)- Indicates that this cmdlet registers an application in development mode. You can use development mode to install applications from a folder of unpackaged files. You can use the current parameter to test your Windows Store apps before you deploy them as app packages. To register an existing app package installation, you must specify the DisableDevelopmentMode parameter and the Register parameter. To specify dependency packages, use the DependencyPath parameter and the DisableDevelopmentMode parameter.
-RegisterByFamilyName (required)- Specifies the parameter -MainPackage that defines the family name or full name to be registered.
-RelatedPackages- This is an optional element that's used to specify the other optional packages that are specified in the main app package. These packages won't be installed as part of the deployment operation.
-RequiredContentGroupOnly- Specifies that only the required content group that's specified in the AppxContentGroupMap.xml must be installed. At this point the app can be launched. Calling Add-AppxPackage and specifying the path to the app triggers the rest of the app to be installed in the order defined in the AppxContentGroupMap.xml.
-RetainFilesOnFailure- In case of a failed deployment, if this switch is set to $true, files that have been created on the target machine during the installation process aren't removed.
-Stage (required)- Stages a package to the system without registering it.
-StubPackageOption- Defines the stub behavior for an app package that's being added or staged. The acceptable values for this parameter are: - Default: Uses the default behavior - InstallFull: Installs as a full app - InstallStub: Installs as a stub app - UsePreference: Uses the current PackageStubPreference for the package
-Update (required)- Specifies that the package being added is a dependency package update. A dependency package is removed from the user account when the parent app is removed. If you don't use this parameter, the package being added is a primary package and isn't removed from the user account if the parent app is removed. To update an already installed package, the new package must have the same package family name.
-Volume- Specifies the AppxVolume object to stage the package in. The volume also specifies the default location for user AppData.
-WhatIf- Shows what would happen if the cmdlet runs. The cmdlet isn't run.
Windows with the Appx module and the Windows feature or management tools that provide it. Confirm target connectivity and version compatibility using the linked Microsoft reference.
This cmdlet changes system state. Review every target and parameter in the official reference, test outside production, and prepare an appropriate backup or rollback. Do not execute the example automatically.