通过 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.