使用 PowerShell 管理 MSIXManaging MSIX with PowerShell

本文說明用來管理 .appx 和 .msix 套件的 PowerShell Cmdlet。This article describes the PowerShell cmdlets that are used to manage your .appx and .msix packages.

MSIX PowerShell CmdletMSIX PowerShell cmdlets

PowerShell CmdletPowerShell cmdlets 說明Description
Add-AppPackageAdd-AppPackage 此 Cmdlet 用來將已簽署的應用程式 (.msix、.appx) 套件新增至裝置。This cmdlet is used to add a signed app (*.msix, *.appx) package to a device. 新增與另一個 MSIX 應用程式有關係的 MSIX 應用程式時,也可以使用 Add-AppPackage Cmdlet,例如:外部套件、選用套件相關套件The Add-AppPackage cmdlet can also be used when adding an MSIX app that has a relationship to another MSIX app such as: External Packages, Optional Packages, and Related Packages.
Remove-AppPackageRemove-AppPackage 此 Cmdlet 用來從裝置中移除已簽署的應用程式 (.msix、.appx) 套件。This cmdlet is used to remove a signed app (*.msix, *.appx) package from a device. 一旦移除,就會移除已簽署應用程式所安裝的資料夾內容,也會移除電腦上對已解除安裝應用程式的任何參考。Once removed, the contents of the folder that the signed app was installed to are removed, as well as any references to the uninstalled application on the machine.
Get-AppPackageGet-AppPackage 此 Cmdlet 會提供一個清單,列出電腦上所有已安裝的已簽署應用程式 (.msix、.appx) 套件。This cmdlet will provide a list of all installed signed app (*.msix, *.appx) packages on the machine. 您可以提供一值來篩選結果。A value can be provided to filter the results. 若要建立篩選的傳回結果,請使用 * 做為萬用字元,將完整或部分字串提供給 -Name 參數。To create a filtered return provide a full or partial string into the -Name parameter using * as the wild character.
Get-AppxDefaultVolumeGet-AppxDefaultVolume 此 Cmdlet 會提供電腦上已簽署應用程式 (.msix、.appx) 套件所使用的預設磁碟區。This cmdlet will provide the default volume being used by signed app (*.msix, *.appx) packages on the machine. 預設磁碟區是電腦上所有部署或安裝作業的目標。The default volume is the target for all deployment or install operations on a machine. 無法從磁碟區清單中移除此磁碟區。This volume can not be removed from the list of volumes.
Get-AppPackageManifestGet-AppPackageManifest 此 Cmdlet 會針對指定的已簽署應用程式完整套件名稱,傳回已簽署應用程式 (.msix、.appx) 套件資訊清單 xml 物件。This cmdlet will return a signed app (*.msix, *.appx) package manifest xml object for the specified signed app full package name.