Microsoft:- MSIX – Commands

What Is MSIX?

Microsoft

Link

MSIX is a Windows app package format that provides a modern packaging experience to all Windows apps. The MSIX package format preserves the functionality of existing app packages and/or install files in addition to enabling new, modern packaging and deployment features to Win32, WPF, and Windows Forms apps.MSIX enables enterprises to stay current and ensure their applications are always up to date. It allows IT Pros and developers to deliver a user centric solution while still reducing the cost of ownership of application by reducing the need to repackage.

 

Outline

Here is a complete of MSIX operations.

  1. List
    • Get-AppxPackage
  2. Install
    • Add-AppxPackage
  3. Remove
    • Remove-AppxPackage

List

Outline

Here are the commands available to list packages:-

  1. Get-AppxPackage

 

Get-AppxPackage

Syntax


powershell -command "Get-AppxPackage -Name [package]"

Sample

Get-AppxPackage – Package Name – OM

powershell -command "Get-AppxPackage -Name '*Microsoft*' | Out-GridView -Wait "

Output
Output – Image

Get-AppxPackage – Package Name – OM

powershell -command "Get-AppxPackage -Name '*OM*'  "

Output – Image

Output – Text
 

>powershell -command "Get-AppxPackage -name *OMNIS*

Name                   : OM
Publisher              : CN=Om
Architecture           : X64
ResourceId             :
Version                : 11.1.0.0
PackageFullName        : OM_11.1.0.0_x64__y98rbz846xffc
InstallLocation        : C:\Program Files\WindowsApps\OM_11.1.0.0_x64__y98rbz846xffc
IsFramework            : False
PackageFamilyName      : OM11.1_y98rbz846xffc
PublisherId            : y98rbz846xffc
PackageUserInformation : {S-1-5-21-79571225-1641353271-416048646-153211 [daniel]: Installed}
IsResourcePackage      : False
IsBundle               : False
IsDevelopmentMode      : False
NonRemovable           : False
IsPartiallyStaged      : False
SignatureKind          : Enterprise
Status                 : Ok


>

 

Install

Outline

Here are the commands available to add packages:-

  1. Add-AppxPackage

 

Add-AppxPackage

Syntax


powershell -command "Add-AppxPackage -path <filename>"

Sample

Add-AppxPackage – Filename

powershell -command "Add-AppxPackage OM.msix"

Output
Output – Image

Remove

Outline

Here are the commands available to remove packages:-

  1. Remove-AppxPackage

 

Remove-AppxPackage

Syntax


powershell -command "Remove-AppxPackage -Name [package]"

Sample

Remove-AppxPackage – Package Name – OM

powershell -command "Remove-AppxPackage OM.msix"

Output
Output – Image

 

Remove-AppxPackage – Package Name – < Missing Package >

powershell -command "Remove-AppxPackage OM.msix"

Output
Output – Image

 

 

>powershell -command "Remove-AppxPackage -package 'OM_11.0.0.0_x64__y98rbz846xffc' "
Remove-AppxPackage : Deployment failed with HRESULT: 0x80073CF1, Package was not found.
Windows cannot remove OM_11.0.0.0_x64__y98rbz846xffc because the current user does not have that package installed. Use Get-AppxPackage to see the list of packages installed.
NOTE: For additional information, look for [ActivityId] f412570b-90fb-0002-ee8e-13f4fb90da01 in the Event Log or use the command line Get-AppPackageLog -ActivityID f412570b-90fb-0002-ee8e-13f4fb90da01
At line:1 char:1
+ Remove-AppxPackage -package 'OM_11.0.0.0_x64__y98rbz846x ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (OM11...__y98rbz846xffc:String) [Remove-AppxPackage], PSInvalidOperationException
    + FullyQualifiedErrorId : DeploymentError,Microsoft.Windows.Appx.PackageManager.Commands.RemoveAppxPackageCommand


>


 

References

  1. Microsoft
    • MSIX
      • What is MSIX
        Link
      • Documentation
        Link
      • Learn > Windows PowerShell > Appx
        • Managing MSIX With PowerShell
          Link
        • Add-AppxPackage
          Link
        • Remove-AppxPackage
          Link

Leave a comment