0% found this document useful (0 votes)
230 views

Powershell Commandlets - APPX Module

Powershell Commandlet Reference for the APPX module.

Uploaded by

leslewis65
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
230 views

Powershell Commandlets - APPX Module

Powershell Commandlet Reference for the APPX module.

Uploaded by

leslewis65
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 44

Powershell Commandlets: APPX

Powershell Commandlet Reference

APPX

By Les Lewis

This is a reference of listing of the full commands and switches


found within the referenced Powershell app. It is the same found in
it’s Get-Help command, just cleaned up into an easier to read format.

Page | 1
Powershell Commandlets: APPX

Table of Contents
Get-AppxLastError ...................................................................................................................................... 7
SYNOPSIS ............................................................................................................................................. 7
SYNTAX .................................................................................................................................................. 7
DESCRIPTION ...................................................................................................................................... 7
PARAMETERS ........................................................................................................................................ 7
INPUTS .................................................................................................................................................. 7
OUTPUTS................................................................................................................................................ 7
NOTES .................................................................................................................................................... 7
RELATED LINKS ................................................................................................................................. 7
Get-AppxLog ............................................................................................................................................... 9
SYNOPSIS ............................................................................................................................................. 9
SYNTAX .................................................................................................................................................. 9
DESCRIPTION ...................................................................................................................................... 9
PARAMETERS ........................................................................................................................................ 9
INPUTS ................................................................................................................................................ 10
OUTPUTS.............................................................................................................................................. 10
NOTES .................................................................................................................................................. 10
RELATED LINKS ............................................................................................................................... 10
Add-AppxPackage ..................................................................................................................................... 11
SYNOPSIS ........................................................................................................................................... 11
SYNTAX ................................................................................................................................................ 11
DESCRIPTION .................................................................................................................................... 11
PARAMETERS ...................................................................................................................................... 12
INPUTS ................................................................................................................................................ 16
OUTPUTS.............................................................................................................................................. 16
NOTES .................................................................................................................................................. 16
RELATED LINKS ............................................................................................................................... 17
Add-AppxVolume ...................................................................................................................................... 18
SYNOPSIS ........................................................................................................................................... 18
SYNTAX ................................................................................................................................................ 18
DESCRIPTION .................................................................................................................................... 18

Page | 2
Powershell Commandlets: APPX

PARAMETERS ...................................................................................................................................... 18
INPUTS ................................................................................................................................................ 19
OUTPUTS.............................................................................................................................................. 19
NOTES .................................................................................................................................................. 19
RELATED LINKS ............................................................................................................................... 19
Dismount-AppxVolume............................................................................................................................. 20
SYNOPSIS ........................................................................................................................................... 20
SYNTAX ................................................................................................................................................ 20
DESCRIPTION .................................................................................................................................... 20
PARAMETERS ...................................................................................................................................... 20
INPUTS ................................................................................................................................................ 21
OUTPUTS.............................................................................................................................................. 21
NOTES .................................................................................................................................................. 21
RELATED LINKS ............................................................................................................................... 21
Get-AppxDefaultVolume........................................................................................................................... 22
SYNOPSIS ........................................................................................................................................... 22
SYNTAX ................................................................................................................................................ 22
DESCRIPTION .................................................................................................................................... 22
PARAMETERS ...................................................................................................................................... 22
INPUTS ................................................................................................................................................ 22
OUTPUTS.............................................................................................................................................. 22
NOTES .................................................................................................................................................. 22
RELATED LINKS ............................................................................................................................... 22
Get-AppxPackage ...................................................................................................................................... 23
SYNOPSIS ........................................................................................................................................... 23
SYNTAX ................................................................................................................................................ 23
DESCRIPTION .................................................................................................................................... 23
PARAMETERS ...................................................................................................................................... 23
INPUTS ................................................................................................................................................ 25
OUTPUTS.............................................................................................................................................. 25
NOTES .................................................................................................................................................. 25
RELATED LINKS ............................................................................................................................... 25
Get-AppxPackageManifest ....................................................................................................................... 27

Page | 3
Powershell Commandlets: APPX

SYNOPSIS ........................................................................................................................................... 27
SYNTAX ................................................................................................................................................ 27
DESCRIPTION .................................................................................................................................... 27
PARAMETERS ...................................................................................................................................... 27
INPUTS ................................................................................................................................................ 28
OUTPUTS.............................................................................................................................................. 28
NOTES .................................................................................................................................................. 28
RELATED LINKS ............................................................................................................................... 29
Get-AppxVolume....................................................................................................................................... 30
SYNOPSIS ........................................................................................................................................... 30
SYNTAX ................................................................................................................................................ 30
DESCRIPTION .................................................................................................................................... 30
PARAMETERS ...................................................................................................................................... 30
INPUTS ................................................................................................................................................ 31
OUTPUTS.............................................................................................................................................. 31
NOTES .................................................................................................................................................. 31
RELATED LINKS ............................................................................................................................... 31
Invoke-CommandInDesktopPackage ........................................................................................................ 32
SYNOPSIS ........................................................................................................................................... 32
SYNTAX ................................................................................................................................................ 32
DESCRIPTION .................................................................................................................................... 32
PARAMETERS ...................................................................................................................................... 32
INPUTS ................................................................................................................................................ 33
OUTPUTS.............................................................................................................................................. 33
NOTES .................................................................................................................................................. 33
RELATED LINKS ............................................................................................................................... 33
Mount-AppxVolume ................................................................................................................................. 34
SYNOPSIS ........................................................................................................................................... 34
SYNTAX ................................................................................................................................................ 34
DESCRIPTION .................................................................................................................................... 34
PARAMETERS ...................................................................................................................................... 34
INPUTS ................................................................................................................................................ 35
OUTPUTS.............................................................................................................................................. 35

Page | 4
Powershell Commandlets: APPX

NOTES .................................................................................................................................................. 35
RELATED LINKS ............................................................................................................................... 35
Move-AppxPackage .................................................................................................................................. 36
SYNOPSIS ........................................................................................................................................... 36
SYNTAX ................................................................................................................................................ 36
DESCRIPTION .................................................................................................................................... 36
PARAMETERS ...................................................................................................................................... 36
INPUTS ................................................................................................................................................ 37
OUTPUTS.............................................................................................................................................. 37
NOTES .................................................................................................................................................. 37
RELATED LINKS ............................................................................................................................... 37
Remove-AppxPackage .............................................................................................................................. 38
SYNOPSIS ........................................................................................................................................... 38
SYNTAX ................................................................................................................................................ 38
DESCRIPTION .................................................................................................................................... 38
PARAMETERS ...................................................................................................................................... 38
INPUTS ................................................................................................................................................ 39
OUTPUTS.............................................................................................................................................. 39
NOTES .................................................................................................................................................. 39
RELATED LINKS ............................................................................................................................... 40
Remove-AppxVolume ............................................................................................................................... 41
SYNOPSIS ........................................................................................................................................... 41
SYNTAX ................................................................................................................................................ 41
DESCRIPTION .................................................................................................................................... 41
PARAMETERS ...................................................................................................................................... 41
INPUTS ................................................................................................................................................ 42
OUTPUTS.............................................................................................................................................. 42
NOTES .................................................................................................................................................. 42
RELATED LINKS ............................................................................................................................... 42
Set-AppxDefaultVolume ........................................................................................................................... 43
SYNOPSIS ........................................................................................................................................... 43
SYNTAX ................................................................................................................................................ 43
DESCRIPTION .................................................................................................................................... 43

Page | 5
Powershell Commandlets: APPX

PARAMETERS ...................................................................................................................................... 43
INPUTS ................................................................................................................................................ 44
OUTPUTS.............................................................................................................................................. 44
NOTES .................................................................................................................................................. 44
RELATED LINKS ............................................................................................................................... 44

Page | 6
Powershell Commandlets: APPX

Get-AppxLastError
SYNOPSIS
Get the last error reported in the app package installation logs.

SYNTAX
Get-AppxLastError [<CommonParameters>]

DESCRIPTION
The Get-AppxLastError cmdlet gets the last error reported in the app
package installation logs for the current Windows PowerShell® session. An
app package has an .appx file name extension.

PARAMETERS
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer,
PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).

INPUTS
None

OUTPUTS
System.Diagnostics.Eventing.Reader.EventLogRecord

NOTES

Example 1: Get the last error

PS C:\> Get-AppxLastError

This command gets the last error reported in the app installation
logs.

RELATED LINKS
Package Manager API http://go.microsoft.com/fwlink/?LinkId=245447

Page | 7
Powershell Commandlets: APPX

How to Deploy App Packages


http://go.microsoft.com/fwlink/?LinkID=231020
Get-AppxPackage
Get-AppxPackageManifest
Get-AppxLog

Page | 8
Powershell Commandlets: APPX

Get-AppxLog
SYNOPSIS
Gets an app package installation log.

SYNTAX
Get-AppxLog [-ActivityId <String>] [<CommonParameters>]

Get-AppxLog [-All] [<CommonParameters>]

DESCRIPTION
The Get-AppxLog cmdlet gets the app package installation log created
during the deployment of an app package. An app package has an .appx file
name extension. The log contains errors, warnings, and additional
information about the processes initiated by cmdlets in the Appx Windows
PowerShell® module.

When Add-AppxPackage or Remove-AppxPackage report a failure, they


return the ActivityID to use with Get-AppxLog .

For more information about common error codes, see Troubleshooting


packaging, deployment, and query of Windows Store apps
(http://go.microsoft.com/fwlink/?LinkId=271201).

PARAMETERS
-ActivityId <String>
Specifies an activity ID. This cmdlet uses the ID to get the log
for a particular app package installation.

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

-All [<SwitchParameter>]
Indicates that the cmdlet gets all logs on the computer. You can
get additional information when you run this cmdlets from Windows
PowerShell as an administrator.

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

<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,

Page | 9
Powershell Commandlets: APPX

ErrorAction, ErrorVariable, WarningAction, WarningVariable,


OutBuffer, PipelineVariable, and OutVariable. For more
information, see about_CommonParameters
(http://go.microsoft.com/fwlink/?LinkID=113216).

INPUTS
System.String[]

OUTPUTS
System.Diagnostics.Eventing.Reader.EventLogRecord

NOTES

Example 1: Get logs for the most recent deployment

PS C:\> Get-AppxLog

This command gets the logs associated with the most recent deployment
operation.
Example 2: Get logs for all logs

PS C:\> Get-AppxLog -All

This command gets all the app package installation logs on the
computer.

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
Troubleshooting packaging, deployment, and query of Windows Store
apps http://go.microsoft.com/fwlink/?LinkId=271201
Get-AppxPackage
Get-AppxPackageManifest
Get-AppxLastError

Page | 10
Powershell Commandlets: APPX

Add-AppxPackage
SYNOPSIS
Adds a signed app package to a user account.

SYNTAX
Add-AppxPackage [-DependencyPackages <String[]>] [-
ForceApplicationShutdown] [-ForceTargetApplicationShutdown] [-
InstallAllResources]
-MainPackage <String> [-Register] [-Confirm] [-WhatIf]
[<CommonParameters>]

Add-AppxPackage [-DependencyPackages <String[]>] [-


ForceApplicationShutdown] [-ForceTargetApplicationShutdown] [-
InstallAllResources]
-MainPackage <String> [-OptionalPackages <String[]>] -
RegisterByFamilyName [-Confirm] [-WhatIf] [<CommonParameters>]

Add-AppxPackage [-Path] <String> [-DependencyPath <String[]>] [-


ExternalPackages <String[]>] [-ForceApplicationShutdown]
[-ForceTargetApplicationShutdown] [-InstallAllResources] [-
OptionalPackages <String[]>] [-RequiredContentGroupOnly] [-Volume
<AppxVolume>]
[-Confirm] [-WhatIf] [<CommonParameters>]

Add-AppxPackage [-Path] <String> [-DependencyPath <String[]>] [-


DisableDevelopmentMode] [-ForceApplicationShutdown]
[-ForceTargetApplicationShutdown] [-InstallAllResources] -Register [-
Confirm] [-WhatIf] [<CommonParameters>]

Add-AppxPackage [-Path] <String> [-DependencyPath <String[]>] [-


ForceApplicationShutdown] [-ForceTargetApplicationShutdown]
[-InstallAllResources] [-RequiredContentGroupOnly] -Update [-Confirm]
[-WhatIf] [<CommonParameters>]

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 Windows® Store apps.

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

Page | 11
Powershell Commandlets: APPX

PARAMETERS
-DependencyPackages <String[]>
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 <String[]>
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 [<SwitchParameter>]
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 <String[]>
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

Page | 12
Powershell Commandlets: APPX

-ForceApplicationShutdown [<SwitchParameter>]
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 [<SwitchParameter>]
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 [<SwitchParameter>]
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 <String>
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 <String[]>

Page | 13
Powershell Commandlets: APPX

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 <String>
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 [<SwitchParameter>]
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. 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 [<SwitchParameter>]
{{Fill RegisterByFamilyName Description}}

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

-RequiredContentGroupOnly [<SwitchParameter>]

Page | 14
Powershell Commandlets: APPX

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 [<SwitchParameter>]
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 <AppxVolume>
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 [<SwitchParameter>]
Prompts you for confirmation before running the cmdlet.

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

-WhatIf [<SwitchParameter>]
Shows what would happen if the cmdlet runs. The cmdlet is not
run.

Required? false

Page | 15
Powershell Commandlets: APPX

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

<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more
information, see
about_CommonParameters
(http://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

Page | 16
Powershell Commandlets: APPX

PS C:\> Add-AppxPackage -Path


"C:\Users\user1\Desktop\MyApp.appxbundle" -ExternalPackages

"C:\Users\user1\Desktop\optionalpackage1.appx","C:\Users\user1\Desktop\op
tionalpackage2.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

Page | 17
Powershell Commandlets: APPX

Add-AppxVolume
SYNOPSIS
Adds an appx volume to the Package Manager.

SYNTAX
Add-AppxVolume [-Path] <String[]> [-Confirm] [-WhatIf]
[<CommonParameters>]

DESCRIPTION
The Add-AppxVolume cmdlet adds an AppxVolume for the Package Manager
to advertise. After you add a volume, appx deployment operations can use
that volume as a target. This cmdlet returns the volume that it adds.
Note, the Path parameter must be specified as a drive letter followed by
"WindowsApps" as the directory. Not using the aforementioned format
could lead to inconsistent behavior in the application model subsystems
or
the volume itself; for more information see the examples section.

PARAMETERS
-Path <String[]>
Specifies the path of the mount point of the volume that this
cmdlet adds.

Required? true
Position? 1
Default value None
Accept pipeline input? True (ByPropertyName, ByValue)
Accept wildcard characters? false

-Confirm [<SwitchParameter>]
Prompts you for confirmation before running the cmdlet.

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

-WhatIf [<SwitchParameter>]
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

Page | 18
Powershell Commandlets: APPX

<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more
information, see
about_CommonParameters
(http://go.microsoft.com/fwlink/?LinkID=113216).

INPUTS

OUTPUTS
Microsoft.Appx.PackageManager.Commands.AppxVolume
This cmdlet returns the AppxVolume object that it adds.

NOTES

Example 1: Add a volume

PS C:\> Add-AppxVolume -Path "E:\WindowsApps"

This command adds the volume E:\WindowsApps to Package Manager.

RELATED LINKS
Dismount-AppxVolume
Get-AppxVolume
Mount-AppxVolume
Remove-AppxVolume

Page | 19
Powershell Commandlets: APPX

Dismount-AppxVolume
SYNOPSIS
Dismounts an appx volume.

SYNTAX
Dismount-AppxVolume [-Volume] <AppxVolume[]> [-Confirm] [-WhatIf]
[<CommonParameters>]

DESCRIPTION
The Dismount-AppxVolume cmdlet dismounts an AppxVolume . After you
dismount a volume, all apps that are deployed to that target become
inaccessible.

PARAMETERS
-Volume <AppxVolume[]>
Specifies the AppxVolume object to dismount.

Required? true
Position? 1
Default value None
Accept pipeline input? True (ByPropertyName, ByValue)
Accept wildcard characters? false

-Confirm [<SwitchParameter>]
Prompts you for confirmation before running the cmdlet.

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

-WhatIf [<SwitchParameter>]
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

<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more
information, see

Page | 20
Powershell Commandlets: APPX

about_CommonParameters
(http://go.microsoft.com/fwlink/?LinkID=113216).

INPUTS

OUTPUTS

NOTES

Example 1: Dismount a volume by using a path

PS C:\> Dismount-AppxVolume -Volume E:\

This command dismounts a volume at the path E:\.


Example 2: Dismount a volume by using an ID

PS C:\> Dismount-AppxVolume -Volume {7e62a691-398e-4fbe-819a-


64f1e407777a}

This command dismounts a volume that has the specified media ID.

RELATED LINKS
Add-AppxVolume
Get-AppxVolume
Mount-AppxVolume
Remove-AppxVolume

Page | 21
Powershell Commandlets: APPX

Get-AppxDefaultVolume
SYNOPSIS
Gets the default appx volume.

SYNTAX
Get-AppxDefaultVolume [<CommonParameters>]

DESCRIPTION
The Get-AppxDefaultVolume cmdlet gets the default AppxVolume . The
default AppxVolume is the default target for all deployment operations on
the
computer. You cannot remove the default AppxVolume from the list of
volumes.

PARAMETERS
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more
information, see
about_CommonParameters
(http://go.microsoft.com/fwlink/?LinkID=113216).

INPUTS

OUTPUTS
Microsoft.Appx.PackageManager.Commands.AppxVolume

NOTES

Example 1: Get the default volume

PS C:\> Get-AppxDefaultVolume

This command gets the current default deployment target.

RELATED LINKS
Set-AppxDefaultVolume

Page | 22
Powershell Commandlets: APPX

Get-AppxPackage
SYNOPSIS
Gets a list of the app packages that are installed in a user profile.

SYNTAX
Get-AppxPackage [[-Name] <String>] [[-Publisher] <String>] [-
AllUsers] [-PackageTypeFilter {None | Main | Framework | Resource |
Bundle | Xap}]
[-User <String>] [-Volume <AppxVolume>] [<CommonParameters>]

DESCRIPTION
The Get-AppxPackage cmdlet gets a list of the app packages that are
installed in a user profile. An app package has an .appx file name
extension.
To get the list of packages for a user profile other than the profile
for the current user, you must run this command by using administrator
permissions.

PARAMETERS
-AllUsers [<SwitchParameter>]
Indicates that this cmdlet lists app packages for all user
accounts on the computer. To use this parameter, you must run the command
by using
administrator permissions.

Required? false
Position? named
Default value False
Accept pipeline input? True (ByPropertyName, ByValue)
Accept wildcard characters? false

-Name <String>
Specifies the name of a particular package. If you specify this
parameter, the cmdlet returns results for this package only. Wildcards
are
permitted.

Required? false
Position? 1
Default value None
Accept pipeline input? True (ByValue)
Accept wildcard characters? false

-PackageTypeFilter <PackageTypes>
Specifies one or more comma-separated types of packages that the
cmdlet gets from the package repository. Valid values are:

Page | 23
Powershell Commandlets: APPX

- Bundle

- Framework

- Main

- Resource

- None

By default, this cmdlet returns only packages of types Main and


Framework.

Required? false
Position? named
Default value None
Accept pipeline input? True (ByPropertyName, ByValue)
Accept wildcard characters? false

-Publisher <String>
Specifies the publisher of a particular package. If you specify
this parameter, the cmdlet returns results only for this publisher.
Wildcards
are permitted.

Required? false
Position? 2
Default value None
Accept pipeline input? True (ByValue)
Accept wildcard characters? false

-User <String>
Specifies a user. If you specify this parameter, the cmdlet
returns a list of app packages that are installed for only the user that
this
cmdlet specifies. To get the list of packages for a user profile
other than the profile for the current user, you must run this command by
using administrator permissions. The user name can be in one of
these formats:

- domain\user_name

- [email protected]

- user_name

- SID-string

Required? false
Position? named
Default value None
Accept pipeline input? True (ByValue)

Page | 24
Powershell Commandlets: APPX

Accept wildcard characters? false

-Volume <AppxVolume>
Specifies an AppxVolume object. If you specify this parameter,
this cmdlet returns only packages that are relative to volume that this
parameter specifies.

Required? false
Position? named
Default value None
Accept pipeline input? True (ByPropertyName, ByValue)
Accept wildcard characters? false

<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more
information, see
about_CommonParameters
(http://go.microsoft.com/fwlink/?LinkID=113216).

INPUTS
System.String[]

OUTPUTS
Microsoft.Windows.Appx.PackageManager.Commands.AppxPackage
This cmdlet returns an AppxPackage object that contains
information, including the full name of the app package.

NOTES

Example 1: Get all app packages for every user account

PS C:\> Get-AppxPackage -AllUsers

This command lists the app packages that are installed for every user
account on the computer.
Example 2: Get an app package for a specific a user

PS C:\> Get-AppxPackage -Name "Package17" -User "Contoso\EvanNarvaez"

This command displays information about Package17 if it is installed


in the specified user profile.

RELATED LINKS
Package Manager API http://go.microsoft.com/fwlink/?LinkId=245447

Page | 25
Powershell Commandlets: APPX

How to Add and Remove Apps


http://go.microsoft.com/fwlink/?LinkID=231020
Add-AppxPackage
Get-AppxPackageManifest
Move-AppxPackage
Remove-AppxPackage

Page | 26
Powershell Commandlets: APPX

Get-AppxPackageManifest
SYNOPSIS
Gets the manifest of an app package.

SYNTAX
Get-AppxPackageManifest [-Package] <String> [[-User] <String>]
[<CommonParameters>]

DESCRIPTION
The Get-AppxPackageManifest cmdlet gets the manifest of an app
package. An app package has an .appx file name extension. The manifest is
an .xml
document that contains information about the package, like the
package ID.

PARAMETERS
-Package <String>
Specifies an AppxPackage object or the full name of a package. To
get the manifest of a package on the computer that is not installed for
the
current user, you must run this command by using administrator
permissions. Wildcards are permitted.

Required? true
Position? 1
Default value None
Accept pipeline input? True (ByValue)
Accept wildcard characters? false

-User <String>
Specifies a user. This cmdlet gets the manifest of packages that
are installed for the user that this parameter specifies. To get the list
of
packages for a user profile other than the profile for the
current user, you must run this command by using administrator
permissions. The
user name can be in one of these formats:

- domain\user_name

- [email protected]

- user_name

- SID-string

Required? false

Page | 27
Powershell Commandlets: APPX

Position? 2
Default value None
Accept pipeline input? True (ByValue)
Accept wildcard characters? false

<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more
information, see
about_CommonParameters
(http://go.microsoft.com/fwlink/?LinkID=113216).

INPUTS
Microsoft.Windows.Appx.PackageManager.Commands.AppxPackage[]
This cmdlet accepts an array of AppxPackage objects that contain
information, including the full name of the app package.

OUTPUTS
System.XML.XMLDocument
This cmdlet returns a read-only .xml document that contains
information about the app package, like the package ID.

NOTES

Example 1: Get the manifest for an app package

PS C:\> Get-AppxPackageManifest -Package


"package1_1.0.0.0_neutral__8wekyb3d8bbwe"

This command gets the manifest for an app package named


package1_1.0.0.0_neutral__8wekyb3d8bbwe.
Example 2: Get the application ID for an app package

PS C:\> (Get-AppxPackage -Name "*WinJS*" | Get-


AppxPackageManifest).package.applications.application.id

This command gets the application ID for an app package that has the
string WinJS in the name.
Example 3

PS C:\> (Get-AppxPackage -Name "*ZuneMusic*" | Get-


AppxPackageManifest).Package.Capabilities

This command gets the capabilities for an app package that has the
string ZuneMusic in the name.

Page | 28
Powershell Commandlets: APPX

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
Add-AppxPackage

Page | 29
Powershell Commandlets: APPX

Get-AppxVolume
SYNOPSIS
Gets appx volumes for the computer.

SYNTAX
Get-AppxVolume [[-Path] <String>] -Offline [<CommonParameters>]

Get-AppxVolume [[-Path] <String>] -Online [<CommonParameters>]

Get-AppxVolume [[-Path] <String>] [<CommonParameters>]

DESCRIPTION
The Get-AppxVolume cmdlet gets a list of AppxVolume objects known to
the computer. Volumes can be added by the user or a device, for instance,
by
using Storage Sense.

PARAMETERS
-Offline [<SwitchParameter>]
Indicates that this cmdlet returns only volumes that are
currently dismounted.

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

-Online [<SwitchParameter>]
Indicates that this cmdlet returns only volumes that are
currently mounted.

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

-Path <String>
Specifies the path of the mount point of a volume. This cmdlet
gets a volume at the location that this parameter specifies.

Required? false
Position? 1
Default value None
Accept pipeline input? True (ByPropertyName, ByValue)
Accept wildcard characters? false

Page | 30
Powershell Commandlets: APPX

<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more
information, see
about_CommonParameters
(http://go.microsoft.com/fwlink/?LinkID=113216).

INPUTS

OUTPUTS
Microsoft.Appx.PackageManager.Commands.AppxVolume

NOTES

Example 1: Get all the volumes

PS C:\> Get-AppxVolume

The command gets all the AppxVolume objects on the computer.


Example 2: Get the volume at a path

PS C:\> Get-AppxVolume -Path F:\

This command gets the AppxVolume at the path F:\.


Example 3: Get mounted volumes

PS C:\> Get-AppxVolume -Online

This command gets only AppxVolume objects that are currently mounted
on the computer.
Example 4: Get volumes that are note mounted

PS C:\> Get-AppxVolume -Offline

This command gets the AppxVolume objects that not currently mounted
on the computer.

RELATED LINKS
Add-AppxVolume
Dismount-AppxVolume
Mount-AppxVolume
Remove-AppxVolume

Page | 31
Powershell Commandlets: APPX

Invoke-CommandInDesktopPackage
SYNOPSIS
{{Fill in the Synopsis}}

SYNTAX
Invoke-CommandInDesktopPackage [-PackageFamilyName] <String> [-AppId]
<String> [-Command] <String> [[-Args] <String>] [[-PreventBreakaway]]
[<CommonParameters>]

DESCRIPTION
{{Fill in the Description}}

PARAMETERS
-AppId <String>
{{Fill AppId Description}}

Required? true
Position? 2
Default value None
Accept pipeline input? True (ByPropertyName, ByValue)
Accept wildcard characters? false

-Args <String>
{{Fill Args Description}}

Required? false
Position? 4
Default value None
Accept pipeline input? True (ByPropertyName, ByValue)
Accept wildcard characters? false

-Command <String>
{{Fill Command Description}}

Required? true
Position? 3
Default value None
Accept pipeline input? True (ByPropertyName, ByValue)
Accept wildcard characters? false

-PackageFamilyName <String>
{{Fill PackageFamilyName Description}}

Required? true
Position? 1
Default value None
Accept pipeline input? True (ByPropertyName, ByValue)

Page | 32
Powershell Commandlets: APPX

Accept wildcard characters? false

-PreventBreakaway [<SwitchParameter>]
{{Fill PreventBreakaway Description}}

Required? false
Position? 5
Default value False
Accept pipeline input? True (ByPropertyName, ByValue)
Accept wildcard characters? false

<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more
information, see
about_CommonParameters
(http://go.microsoft.com/fwlink/?LinkID=113216).

INPUTS
System.String
System.Management.Automation.SwitchParameter

OUTPUTS
System.Object

NOTES

Example 1

PS C:\> {{ Add example code here }}

{{ Add example description here }}

RELATED LINKS

Page | 33
Powershell Commandlets: APPX

Mount-AppxVolume
SYNOPSIS
Mounts an appx volume.

SYNTAX
Mount-AppxVolume [-Volume] <AppxVolume[]> [-Confirm] [-WhatIf]
[<CommonParameters>]

DESCRIPTION
The Mount-AppxVolume cmdlet mounts an AppxVolume . After you mount a
volume, all apps that are deployed to that target become accessible.

PARAMETERS
-Volume <AppxVolume[]>
Specifies the AppxVolume object to mount.

Required? true
Position? 1
Default value None
Accept pipeline input? True (ByPropertyName, ByValue)
Accept wildcard characters? false

-Confirm [<SwitchParameter>]
Prompts you for confirmation before running the cmdlet.

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

-WhatIf [<SwitchParameter>]
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

<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more
information, see

Page | 34
Powershell Commandlets: APPX

about_CommonParameters
(http://go.microsoft.com/fwlink/?LinkID=113216).

INPUTS

OUTPUTS

NOTES

Example 1: Mount a volume by using a path

PS C:\> Mount-AppxVolume -Volume E:\

This command mounts a volume at the path E:\.


Example 2: Mount a volume by using an ID

PS C:\> Mount-AppxVolume -Volume {7e62a691-398e-4fbe-819a-


64f1e407777a}

This command mounts a volume that has the specified media ID.

RELATED LINKS
Add-AppxVolume
Dismount-AppxVolume
Get-AppxVolume
Remove-AppxVolume

Page | 35
Powershell Commandlets: APPX

Move-AppxPackage
SYNOPSIS
Moves a package from its current location to another appx volume.

SYNTAX
Move-AppxPackage [-Package] <String[]> [-Volume] <AppxVolume> [-
Confirm] [-WhatIf] [<CommonParameters>]

DESCRIPTION
The Move-AppxPackage cmdlet moves a package from its current location
to another AppxVolume . The new location must be a volume that Package
Manager knows about and that is mounted. This cmdlet also moves your
application data to the specified volume.

PARAMETERS
-Package <String[]>
Specifies an AppxPackage object or the full name of a package.
This cmdlet moves the package that this parameter specifies.

Required? true
Position? 1
Default value None
Accept pipeline input? True (ByPropertyName, ByValue)
Accept wildcard characters? false

-Volume <AppxVolume>
Specifies an AppxVolume object. The cmdlet moves the package to
the volume that this parameter specifies.

Required? true
Position? 2
Default value None
Accept pipeline input? True (ByPropertyName, ByValue)
Accept wildcard characters? false

-Confirm [<SwitchParameter>]
Prompts you for confirmation before running the cmdlet.

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

-WhatIf [<SwitchParameter>]
Shows what would happen if the cmdlet runs. The cmdlet is not
run.

Page | 36
Powershell Commandlets: APPX

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

<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more
information, see
about_CommonParameters
(http://go.microsoft.com/fwlink/?LinkID=113216).

INPUTS

OUTPUTS

NOTES

Example 1: Move a package to a volume specified by a path

PS C:\> Move-AppxPackage -Package


"package1_1.0.0.0_neutral__8wekyb3d8bbwe" -Volume F:\

This command moves package that has the specified name to volume F:\.
This cmdlet also moves your app data.
Example 2: Move a package to a volume specified by an ID

PS C:\> Move-AppxPackage -Package


"package1_1.0.0.0_neutral__8wekyb3d8bbwe" -Volume {d2a4d1f4-f45a-46f3-
a419-160ab52af091}

This command moves package that has the specified name to the volume
that has the specified media ID. This cmdlet also moves your app data.

RELATED LINKS
Add-AppxPackage
Get-AppxPackage
Remove-AppxPackage

Page | 37
Powershell Commandlets: APPX

Remove-AppxPackage
SYNOPSIS
Removes an app package from a user account.

SYNTAX
Remove-AppxPackage [-Package] <String> [-AllUsers] [-Confirm] [-
WhatIf] [<CommonParameters>]

Remove-AppxPackage [-Package] <String> [-PreserveApplicationData] [-


Confirm] [-WhatIf] [<CommonParameters>]

Remove-AppxPackage [-Package] <String> -User <String> [-Confirm] [-


WhatIf] [<CommonParameters>]

DESCRIPTION
The Remove-AppxPackage cmdlet removes an app package from a user
account. An app package has an .appx file name extension.

PARAMETERS
-AllUsers [<SwitchParameter>]
{{Fill AllUsers Description}}

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

-Package <String>
Specifies an AppxPackage object or the full name of a package.

Required? true
Position? 1
Default value None
Accept pipeline input? True (ByValue)
Accept wildcard characters? false

-PreserveApplicationData [<SwitchParameter>]
Specifies that the cmdlet preserves the application data during
the package removal. The application data is available for later use.

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

Page | 38
Powershell Commandlets: APPX

-User <String>
{{Fill User Description}}

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

-Confirm [<SwitchParameter>]
Prompts you for confirmation before running the cmdlet.

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

-WhatIf [<SwitchParameter>]
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

<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more
information, see
about_CommonParameters
(http://go.microsoft.com/fwlink/?LinkID=113216).

INPUTS
System.String[]

Microsoft.Windows.Appx.PackageManager.Commands.AppxPackage
An AppxPackage object that contain information, including the
full name of the app package.

OUTPUTS
None

NOTES

Page | 39
Powershell Commandlets: APPX

Example 1: Remove an app package

PS C:\> Remove-AppxPackage -Package


"package1_1.0.0.0_neutral__8wekyb3d8bbwe"

This command removes an app package named


package1_1.0.0.0_neutral__8wekyb3d8bbwe from the account of the current
user.

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
Add-AppxPackage
Move-AppxPackage
Get-AppxLog
Get-AppxLastError

Page | 40
Powershell Commandlets: APPX

Remove-AppxVolume
SYNOPSIS
Removes an appx volume.

SYNTAX
Remove-AppxVolume [-Volume] <AppxVolume[]> [-Confirm] [-WhatIf]
[<CommonParameters>]

DESCRIPTION
The Remove-AppxVolume cmdlet removes an AppxVolume . You can only
remove a volume after there are no apps staged to it for any user. After
you
remove a volume, apps can no longer be added to it.

PARAMETERS
-Volume <AppxVolume[]>
Specifies the AppxVolume object to remove.

Required? true
Position? 1
Default value None
Accept pipeline input? True (ByPropertyName, ByValue)
Accept wildcard characters? false

-Confirm [<SwitchParameter>]
Prompts you for confirmation before running the cmdlet.

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

-WhatIf [<SwitchParameter>]
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

<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,

Page | 41
Powershell Commandlets: APPX

OutBuffer, PipelineVariable, and OutVariable. For more


information, see
about_CommonParameters
(http://go.microsoft.com/fwlink/?LinkID=113216).

INPUTS

OUTPUTS

NOTES

Example 1: Remove a volume by using an ID

PS C:\> Remove-AppxVolume -Volume {984786d3-0cae-49de-a68f-


8bedb0ca260b}

This command removes a volume that has the specified media ID.
Example 2: Remove a volume by using a path

PS C:\> Remove-AppxVolume -Volume E:\

This command removes a volume at the path E:\.

RELATED LINKS
Add-AppxVolume
Dismount-AppxVolume
Get-AppxVolume
Mount-AppxVolume

Page | 42
Powershell Commandlets: APPX

Set-AppxDefaultVolume
SYNOPSIS
Specifies a default appx volume.

SYNTAX
Set-AppxDefaultVolume [-Volume] <AppxVolume> [-Confirm] [-WhatIf]
[<CommonParameters>]

DESCRIPTION
The Set-AppxDefaultVolume cmdlet specifies a default AppxVolume . The
default AppxVolume is the default target for all deployment operations on
the computer. Deployment operations can specify a different non-
default target volume.

PARAMETERS
-Volume <AppxVolume>
Specifies the path a volume. This cmdlet sets the volume that
this parameter specifies to be the default deployment target for the
computer.

Required? true
Position? 1
Default value None
Accept pipeline input? True (ByPropertyName, ByValue)
Accept wildcard characters? false

-Confirm [<SwitchParameter>]
Prompts you for confirmation before running the cmdlet.

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

-WhatIf [<SwitchParameter>]
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

<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,

Page | 43
Powershell Commandlets: APPX

ErrorAction, ErrorVariable, WarningAction, WarningVariable,


OutBuffer, PipelineVariable, and OutVariable. For more
information, see
about_CommonParameters
(http://go.microsoft.com/fwlink/?LinkID=113216).

INPUTS

OUTPUTS

NOTES

Example 1: Set a default volume by using a path

PS C:\> Set-AppxDefaultVolume -Volume F:\

This command sets the default volume to be the volume F:\.


Example 2: Set a default volume by using an ID

PS C:\> Set-AppxDefaultVolume -Volume {ef23c8d6-b13c-4c4c-ae3b-


7d5a162de9b9}

This command sets the default volume to be the one that has the
specified media ID.

RELATED LINKS
Get-AppxDefaultVolume

Page | 44

You might also like