问题描述
更新到 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
文章评论