Add-AppxPackage

Add-AppxPackage

Adds a signed app package (.appx) to a user account.

구문

Parameter Set: AddSet
Add-AppxPackage [-Path] <String> [-DependencyPath <String[]> ] [-ForceApplicationShutdown] [-InstallAllResources] [-Confirm] [-WhatIf] [ <CommonParameters>]

Parameter Set: RegisterByPackageFullNameSet
Add-AppxPackage -MainPackage <String> [-DependencyPackages <String[]> ] [-InstallAllResources] [-Confirm] [-WhatIf] [ <CommonParameters>]

Parameter Set: RegisterSet
Add-AppxPackage [-Path] <String> -Register [-DependencyPath <String[]> ] [-DisableDevelopmentMode] [-ForceApplicationShutdown] [-InstallAllResources] [-Confirm] [-WhatIf] [ <CommonParameters>]

Parameter Set: UpdateSet
Add-AppxPackage [-Path] <String> -Update [-DependencyPath <String[]> ] [-ForceApplicationShutdown] [-InstallAllResources] [-Confirm] [-WhatIf] [ <CommonParameters>]

자세한 설명

The Add-AppxPackage cmdlet adds a signed app package (.appx) to a user account. 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 Windows® 스토어 앱.

To update an already installed package, the new package must have the same package family name.

매개 변수

-DependencyPackages<String[]>

Specifies the dependency package full name or dependency package bundle full name to be registered.

별칭

없음

필수 여부

false

위치

named

기본값

없음

파이프라인 입력 적용 여부

True (ByValue)

와일드카드 문자 허용 여부

false

-DependencyPath<String[]>

Specifies the file path of a dependency package that's required for the installation of the app package (.appx or .appxbundle). You can specify the paths to more than one dependency package.

별칭

없음

필수 여부

false

위치

named

기본값

없음

파이프라인 입력 적용 여부

false

와일드카드 문자 허용 여부

false

-DisableDevelopmentMode

Registers an existing app package (.appx or .appxbundle) installation that has been disabled, didn't register, or has become corrupted. Use DisableDevelopmentMode 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.

별칭

없음

필수 여부

false

위치

named

기본값

없음

파이프라인 입력 적용 여부

false

와일드카드 문자 허용 여부

false

-ForceApplicationShutdown

Forces all active processes that are associated with the package or its dependencies to shut down.

별칭

없음

필수 여부

false

위치

named

기본값

없음

파이프라인 입력 적용 여부

false

와일드카드 문자 허용 여부

false

-InstallAllResources

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 flag can only be used when specifying a resource bundle or resource bundle manifest.

별칭

없음

필수 여부

false

위치

named

기본값

없음

파이프라인 입력 적용 여부

false

와일드카드 문자 허용 여부

false

-MainPackage<String>

Specifies the main package full name or bundle full name to be registered.

별칭

없음

필수 여부

true

위치

named

기본값

없음

파이프라인 입력 적용 여부

True (ByValue)

와일드카드 문자 허용 여부

false

-Path<String>

Specifies the file path of the app package (.appx or .appxbundle).

별칭

없음

필수 여부

true

위치

1

기본값

없음

파이프라인 입력 적용 여부

true (ByValue)

와일드카드 문자 허용 여부

false

-Register

Registers an application in development mode. You can use development mode to install applications from a folder of unpackaged files. You can use the Register parameter to test your Windows® 스토어 앱 before you deploy them as app packages (.appx). To register an existing app package (.appx) installation, you must specify the DisableDevelopmentMode parameter along with -Register. In order to specify dependency packages, specify the DependencyPath parameter and the DisableDevelopmentMode parameter.

별칭

없음

필수 여부

true

위치

named

기본값

없음

파이프라인 입력 적용 여부

false

와일드카드 문자 허용 여부

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 -Update, the package being added will be flagged as a primary package and will not be 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.

별칭

없음

필수 여부

true

위치

named

기본값

없음

파이프라인 입력 적용 여부

false

와일드카드 문자 허용 여부

false

-Confirm

cmdlet을 실행하기 전에 확인 메시지가 표시됩니다.

필수 여부

false

위치

named

기본값

false

파이프라인 입력 적용 여부

false

와일드카드 문자 허용 여부

false

-WhatIf

cmdlet이 실행될 경우 결과 동작을 표시합니다. cmdlet이 실행되지 않습니다.

필수 여부

false

위치

named

기본값

false

파이프라인 입력 적용 여부

false

와일드카드 문자 허용 여부

false

<CommonParameters>

이 cmdlet은 일반 매개 변수 -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer 및 -OutVariable을 지원합니다. 자세한 내용은 다음을 참조하세요. about_CommonParameters(https://go.microsoft.com/fwlink/p/?LinkID=113216).

입력

입력 유형은 cmdlet에 파이프할 수 있는 개체의 유형입니다.

  • System.String[]
  • System.IO.FileInfo

출력

출력 유형은 cmdlet이 내보내는 개체의 유형입니다.

  • None

예제

Example 1

This command adds an app package (.appx) that the package contains.

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

Example 2

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.

PS C:\> $manifestpath = (get-appxpackage -Name "*WindowsCalculator*").InstallLocation + "\Appxmanifest.xml"
PS C:\> Add-AppxPackage -register $manifestpath –DisableDevelopmentMode

관련 항목

Get-AppxPackage

Get-AppxPackageManifest

Remove-AppxPackage

Get-AppxLog

Get-AppxLastError

Package Manager API

How to Add and Remove Apps