powershell7 Add-AppxPackage报错

2021年10月22日 4649点热度 0人点赞 0条评论

问题描述

更新到 powershell7 之后,用 Add-AppxPackage 提示

Add-AppxPackage: The 'Add-AppxPackage' command was found in the module 'Appx', but the module could not be loaded. For more information, run 'Import-Module Appx'.

然后执行 Import-Module Appx 报错

Import-Module: Operation is not supported on this platform. (0x80131539)

解决方案

powershell文档里可能有吧,Import-Module 时加上 -UseWindowsPowerShell

Import-Module Appx -UseWindowsPowerShell

KAMINO

这个人很懒,什么都没留下

文章评论