The Get-AppXPackage Cmdlet

The Get-AppXPackage cmdlet allows you to view which applications are installed on a device and is the primary method to identify which applications are installed on a device so that you can manage them using the other PowerShell cmdlets.


Getting the user’s package list

It is common to start with the following command to generate a list that covers applications installed for the logged in user.


Get-AppXPackage

The resulting list will include all kinds of applications, including those that are part of the system, store apps, and developer signed ones. The output will be a list of packages, one of which is shown here:


Name              : windows.immersivecontrolpanel
Publisher         : CN=Microsoft Corporation,   
                    O=Microsoft Corporation,  
                    L=Redmond, S=Washington, C=US
Architecture      : Neutral
ResourceId        : neutral
Version           : 10.0.2.1000
PackageFullName   : windows.immersivecontrolpanel
                     _10.0.2.1000_neutral_neutral_cw5n1h2txyewy
InstallLocation   : C:\Windows\ImmersiveControlPanel
IsFramework       : False
PackageFamilyName : windows.immersivecontrolpanel
                    _cw5n1h2txyewy
PublisherId       : cw5n1h2txyewy
IsResourcePackage : False
IsBundle          : False
IsDevelopmentMode : False
NonRemovable      : True
IsPartiallyStaged : False
SignatureKind     : System
Status            : Ok

Sample output generated for an application by Get-AppXPackage


Eliminating System and Store Apps

While the cmdlet directly supports certain types of filters, we can also pipe the output to an external filter to be more creative. For example, the following line would filter only those packages signed by a developer:


Get-AppXPackage | % {if($_.SignatureKind -eq “developer”){$_.name}}

This produces a list of just the names, but changing “$_.name” to “$_” would show the entire object.


PascalBerger.MSIXCommander
MSIXHero
NotepadPlusPlus-O2004-M2020.824-P430-F
UltraEdit-Class102-O2004
Avogadro-O2004-M2020.824-P430-P
AppPersonalization-Class102
TMurgent-LotsOfFonts-M2020.1006-P4433
23572TimMangan.TMurgent-PsfTooling

Sample output of a filtered list shown package names only


Getting all applications

If you want to see all applications, for each user account registered on a device, so that you can perform a cursor assessment of the applications that are installed on a device, the following cmdlet parameter is available.


Get-AppXPackage -AllUsers

Note: To use the -AllUsers parameter, the PowerShell process must have been elevated using RunAsAdmin. This is true for any AppX PowerShell command that affects more than the current user.


When you run that command, the console output will list all the applications on the machine, including all the specified parameters. The output for a single application is presented in the figure below.


Name                   	: Microsoft.MicrosoftEdge.Stable
Publisher              	: CN=Microsoft Corporation,   
                          O=Microsoft Corporation,  
                          L=Redmond, S=Washington, C=US
Architecture           	: Neutral
ResourceId             	:
Version                	: 85.0.564.63
PackageFullName        	: Microsoft.MicrosoftEdge.
                           Stable_85.0.564.63_neutral__8wekyb3d8bbwe
InstallLocation        	: C:\Program Files\WindowsApps\
                         Microsoft.MicrosoftEdge.
                         Stable_85.0.564.
                         63_neutral__8wekyb3d8bbwe
IsFramework            	: False
PackageFamilyName 	: Microsoft.MicrosoftEdge.
                          Stable_8wekyb3d8bbwe
PublisherId            	: 8wekyb3d8bbwe

PackageUserInformation	: {S-1-5-21-250224505-1589582600-2170371117-1001
                          [kkaminsk]: Installed}

IsResourcePackage      	: False
IsBundle               	: False
IsDevelopmentMode      	: False
NonRemovable           	: False
IsPartiallyStaged      	: False
SignatureKind          	: Developer
Status                 	: Ok

Sample output generated for an application by Get-AppXPackage -AllUsers


Additional Filtering Options

Once the big picture is assessed, the next step is to begin filtering the application data returned by Get-AppXPackage. You can filter for "application name" by including the Name parameter with a wildcard character.


In the next example, you can see how to use the Get-AppPackage command to filter the results for applications named beginning with “Microsoft.”.


Get-AppXPackage -Name Microsoft.*

You can add in multiple filters to the Get-AppPackage cmdlet. So, for example, most of the time we want to know which applications are assigned to a particular user on a device. Add the User parameter to the previous example along with a user account and Get-AppPackage will return a list of applications published to that user.


Get-AppXPackage -Name Microsoft.ScreenSketch -User LocalUser

In some instances, you may need to specify the domain that the user is a part of when a device is joined to Active Directory. However, the domain name is optional when using this parameter.


Get-AppXPackage -Name Microsoft.ScreenSketch -User Contoso\DomainUser