Get-AppxPackage
Get-AppxPackage
Gets a list of the app packages that are installed in a user profile.
Syntax
Parameter Set: Default
Get-AppxPackage [[-Name] <String> ] [[-Publisher] <String> ] [-AllUsers] [-User <String> ] [ <CommonParameters>]
Detailed 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
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.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
true(ByValue,ByPropertyName) |
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.
Aliases |
none |
Required? |
false |
Position? |
1 |
Default Value |
none |
Accept Pipeline Input? |
true(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.
Aliases |
none |
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
-- user_name@fqn.domain.tld
-- user_name
-- SID-string
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
true(ByValue) |
Accept Wildcard Characters? |
false |
<CommonParameters>
This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).
Inputs
The input type is the type of the objects that you can pipe to the cmdlet.
- System.String[]
Outputs
The output type is the type of the objects that the cmdlet emits.
Microsoft.Windows.Appx.PackageManager.Commands.AppxPackage
This cmdlet returns an AppxPackage object that contains information, including the full name of the app package.
Examples
Example 1: Get all app packages for every user account
This command lists the app packages that are installed for every user account on the computer.
PS C:\> Get-AppxPackage -AllUsers
Example 2: Get an app package for a specific a user
This command displays information about Package17 if it is installed in the specified user profile.
PS C:\> Get-AppxPackage -Name "Package17" –User "Contoso\EvanNarvaez"