Windows PowerShell command on Get-command Add-AppPackage
MyWebUniversity

Windows PowerShell command on Get-command Add-AppPackage

NAME

Add-AppxPackage

SYNOPSIS

Adds a signed app package to a user account.

SYNTAX

Add-AppxPackage [-DependencyPackages ] [-ForceApplicationShutdown] [-ForceTargetApplicationShutdown]

[-InstallAllResources] -MainPackage [-Register] [-Confirm] [-WhatIf] []

Add-AppxPackage [-DependencyPackages ] [-ForceApplicationShutdown] [-ForceTargetApplicationShutdown]

[-InstallAllResources] -MainPackage [-OptionalPackages ] -RegisterByFamilyName [-Confirm]

[-WhatIf] []

Add-AppxPackage [-Path] [-DependencyPath ] [-ExternalPackages ]

[-ForceApplicationShutdown] [-ForceTargetApplicationShutdown] [-InstallAllResources] [-OptionalPackages

] [-RequiredContentGroupOnly] [-Volume ] [-Confirm] [-WhatIf] []

Add-AppxPackage [-Path] [-DependencyPath ] [-DisableDevelopmentMode]

[-ForceApplicationShutdown] [-ForceTargetApplicationShutdown] [-InstallAllResources] -Register [-Confirm]

[-WhatIf] []

Add-AppxPackage [-Path] [-DependencyPath ] [-ForceApplicationShutdown]

[-ForceTargetApplicationShutdown] [-InstallAllResources] [-RequiredContentGroupOnly] -Update [-Confirm] [-WhatIf]

[]

DESCRIPTION

The Add-AppxPackage cmdlet adds a signed app package to a user account. An app package has an .appx file name

extension. Use the DependencyPath parameter to add all other packages that are required for the installation of the app package. You can use the Register parameter to install from a folder of unpackaged files during development of Windowsr Store apps. To update an already installed package, the new package must have the same package family name.

PARAMETERS

-DependencyPackages

Specifies the dependency package full name or dependency package bundle full name to be registered. Required? false Position? named Default value None Accept pipeline input? True (ByValue) Accept wildcard characters? false

-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 .appx or .appxbundle file name extension. You can specify the paths to more than one dependency package. Required? false Position? named Default value None Accept pipeline input? False Accept wildcard characters? false

-DisableDevelopmentMode []

Indicates that this cmdlet registers an existing app package installation that has been disabled, did not 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 (http://go.microsoft.com/fwlink/?LinkId=245447)has staged. Use the Register parameter to specify the location of the app package manifest .xml file from the installation location. Required? false Position? named Default value False Accept pipeline input? False Accept wildcard characters? false

-ExternalPackages

Specifies an array of optional packages that must be installed along with the app package. It is an atomic operation which means that if the app or its optional packages fail to install, the deployment operation will be aborted Required? false Position? named Default value None Accept pipeline input? False Accept wildcard characters? false

-ForceApplicationShutdown []

Indicates that this cmdlet forces all active processes that are associated with the package or its dependencies to shut down. If you specify this parameter, do not specify the ForceTargetApplicationShutdown parameter. Required? false Position? named Default value False Accept pipeline input? False Accept wildcard characters? false

-ForceTargetApplicationShutdown []

Indicates that this cmdlet forces all active processes that are associated with the package to shut down. If you specify this parameter, do not specify the ForceApplicationShutdown parameter. Required? false Position? named Default value False Accept pipeline input? False Accept wildcard characters? false

-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. Required? false Position? named Default value False Accept pipeline input? False Accept wildcard characters? false

-MainPackage

Specifies the main package full name or bundle full name to register. Required? true Position? named Default value None Accept pipeline input? True (ByValue) Accept wildcard characters? false

-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 do not need to pass in a path to the optional package(s). It is an atomic operation which means that if the app or its optional packages fail to install, the deployment operation will be aborted Required? false Position? named Default value None Accept pipeline input? False Accept wildcard characters? false

-Path

Specifies the file path of the app package. An app package has an .appx or .appxbundle file name extension. Required? true Position? 1 Default value None Accept pipeline input? True (ByValue) Accept wildcard characters? false

-Register []

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 Windowsr 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. In order to specify dependency packages, specify the DependencyPath parameter and the DisableDevelopmentMode parameter. Required? true Position? named Default value False Accept pipeline input? False Accept wildcard characters? false

-RegisterByFamilyName []

{{Fill RegisterByFamilyName Description}}

Required? true Position? named Default value False Accept pipeline input? False Accept wildcard characters? false

-RequiredContentGroupOnly []

Specifies that only the required content group that is specified in the AppxContentGroupMap.xml must be

installed. At this point the app can be launched. Calling add-appxpackage specifying the path to the app,

triggers the rest of the app to be installed in the order defined in the AppxContentGroupMap.xml. Required? false Position? named Default value False Accept pipeline input? False Accept wildcard characters? false

-Update []

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 do not use this parameter, the package being added is a primary package and is not 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. Required? true Position? named Default value False Accept pipeline input? False Accept wildcard characters? false

-Volume

Specifies the AppxVolume object to which to stage the package. The volume also specifies the default location for user AppData . Required? false Position? named Default value None

Accept pipeline input? True (ByPropertyName, ByValue)

Accept wildcard characters? false

-Confirm []

Prompts you for confirmation before running the cmdlet. Required? false Position? named Default value False Accept pipeline input? False Accept wildcard characters? false

-WhatIf []

Shows what would happen if the cmdlet runs. The cmdlet is not run. Required? false Position? named Default value False Accept pipeline input? False Accept wildcard characters? false This cmdlet supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer, PipelineVariable, and OutVariable. For more information, see about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).

INPUTS

System.String[] System.IO.FileInfo

OUTPUTS

None

NOTES

Example 1: Add an app package

PS C:\> Add-AppxPackage -Path "C:\Users\user1\Desktop\MyApp.appx" -DependencyPath

"C:\Users\user1\Desktop\winjs.appx" This command adds an app package that the package contains.

Example 2: Add a disabled app package in development mode

PS C:\> $ManifestPath = (Get-AppxPackage -Name "*WindowsCalculator*").InstallLocation + "\Appxmanifest.xml"

PS C:\> Add-AppxPackage -Path $ManifestPath -Register -DisableDevelopmentMode

This command gets the full path of the package manifest file of an installed Windows Store app, and then registers that package. You can use DisableDevelopmentMode to register an application that is staged by the StagePackageAsync API, has been disabled, or has become corrupted during testing.

Example 3: Add an app along with its optional packages

PS C:\> Add-AppxPackage -Path "C:\Users\user1\Desktop\MyApp.appxbundle" -ExternalPackages

"C:\Users\user1\Desktop\optionalpackage1.appx","C:\Users\user1\Desktop\optionalpackage2.appxbundle"

PS C:\> Add-AppxPackage -Path "C:\Users\user1\Desktop\MyApp.appxbundle" -OptionalPackages

"29270sandstorm.OptionalPackage1_gah1vdar1nn7a" This command adds an app package along with its optional packages. It is an atomic operation which means that if the app or its optional packages fail to install, the deployment operation will be aborted

Example 4: Install only the required section of a streaming app

PS C:\> Add-AppxPackage -Path "C:\Users\user1\Desktop\MyApp.appxbundle" -RequiredContentGroupOnly

This command adds an app package but only installs the required section of a streaming app. Calling this command again without the RequiredContentGroupOnly flag proceeds to install the rest of the application in the order defined by the AppxContentGroupMap.xml

RELATED LINKS

Package Manager API http://go.microsoft.com/fwlink/?LinkId=245447 How to Add and Remove Apps http://go.microsoft.com/fwlink/?LinkID=231020

Get-AppxPackage

Get-AppxPackageManifest

Move-AppxPackage

Remove-AppxPackage



Contact us      |      About us      |      Term of use      |       Copyright © 2000-2019 OurUNIX.com ™