powershell 的 get-appxpackage 命令报错

get-appxpackage

get-appxpackage: The term 'get-appxpackage' is not recognized as a name of a cmdlet, function, script file, or executable program.

Check the spelling of the name, or if a path was included, verify that the path is correct and try again.图片

* 请尝试更小页码。

* 请只输入数字。

* 请尝试更小页码。

* 请只输入数字。

Hi JiaYun000,

I am Dave, I will help you with this.

You have a dollar ($) symbol before get-appxpackage in your command.

Remove the $ symbol and that command will be recognized.
___________________________________________________________________

Power to the Developer!

MSI GV72 - 17.3", i7-8750H (Hex Core), 32GB DDR4, 4GB GeForce GTX 1050 Ti, 256GB NVMe M2, 2TB HDD

此回复是否有帮助?

抱歉,这没有帮助。

太棒了! 感谢你的反馈。

你对此回复的满意度如何?

感谢你的反馈,它能帮助我们改进网站。

你对此回复的满意度如何?

感谢你的反馈。

这个'$'是主题中自带的,并非我输入的命令。图片

此回复是否有帮助?

抱歉,这没有帮助。

太棒了! 感谢你的反馈。

你对此回复的满意度如何?

感谢你的反馈,它能帮助我们改进网站。

你对此回复的满意度如何?

感谢你的反馈。

Hi JiaYun000,

Run that command in PowerShell, not in Command Prompt, it will then work.
___________________________________________________________________

Power to the Developer!

MSI GV72 - 17.3", i7-8750H (Hex Core), 32GB DDR4, 4GB GeForce GTX 1050 Ti, 256GB NVMe M2, 2TB HDD

此回复是否有帮助?

抱歉,这没有帮助。

太棒了! 感谢你的反馈。

你对此回复的满意度如何?

感谢你的反馈,它能帮助我们改进网站。

你对此回复的满意度如何?

感谢你的反馈。

谢谢你的提醒,但这就是PowerShell,而不是Command Prompt

此回复是否有帮助?

抱歉,这没有帮助。

太棒了! 感谢你的反馈。

你对此回复的满意度如何?

感谢你的反馈,它能帮助我们改进网站。

你对此回复的满意度如何?

感谢你的反馈。

Hi JiaYun000,

I just tested and that command does work in PowerShell, try right clicking the PowerShell icon an select 'Run ad Administrator, then run that command.

Also, is your PC connected to a work or school account?

What are you trying to fix using that command?
___________________________________________________________________

Power to the Developer!

MSI GV72 - 17.3", i7-8750H (Hex Core), 32GB DDR4, 4GB GeForce GTX 1050 Ti, 256GB NVMe M2, 2TB HDD

此回复是否有帮助?

抱歉,这没有帮助。

太棒了! 感谢你的反馈。

你对此回复的满意度如何?

感谢你的反馈,它能帮助我们改进网站。

你对此回复的满意度如何?

感谢你的反馈。

谢谢,我已经尝试过‘以管理员身份运行’但依然无效。

我没有也连接到工作或学校帐户,这台电脑是我个人使用的。

另外,我使用这个命令是为了修复microsoft store中安装‘Web 媒体扩展’出现‘0x80070057’错误的。

命令是:
get-appxpackage *store* | remove-Appxpackage
Get-AppXPackage *WindowsStore* -AllUsers | Foreach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}

不幸的是,‘Add-AppxPackage’命令也无法使用,会同样的报错。

此回复是否有帮助?

抱歉,这没有帮助。

太棒了! 感谢你的反馈。

你对此回复的满意度如何?

感谢你的反馈,它能帮助我们改进网站。

你对此回复的满意度如何?

感谢你的反馈。

Hi JiaYun000,

That command should work on your PC in PowerShell as Administrator, your Windows installation may be corrupt, try performing an in-place repair of your Windows 11 using the ISO.

Please follow the steps, this is then just an update and your files and applications will remain untouched.

Click this link:
https://www.microsoft.com/en-us/software-downlo...
to download the Windows 11 ISO

When the ISO file completes downloading

Disconnect from the Internet

Disconnect all external devices with the exception of a mouse or keyboard.

Temporarily disable any 3rd party Anti-virus you may have installed

Then, in Windows File Explorer, double click the ISO and then run Setup.exe and select the upgrade option.
___________________________________________________________________

Power to the Developer!

MSI GV72 - 17.3", i7-8750H (Hex Core), 32GB DDR4, 4GB GeForce GTX 1050 Ti, 256GB NVMe M2, 2TB HDD

此回复是否有帮助?

抱歉,这没有帮助。

太棒了! 感谢你的反馈。

你对此回复的满意度如何?

感谢你的反馈,它能帮助我们改进网站。

你对此回复的满意度如何?

感谢你的反馈。

OK,我这就去试一试。

我使用的是beta版,也许这些问题是beta版导致的。

此回复是否有帮助?

抱歉,这没有帮助。

太棒了! 感谢你的反馈。

你对此回复的满意度如何?

感谢你的反馈,它能帮助我们改进网站。

你对此回复的满意度如何?

感谢你的反馈。

Hi JiaYun000,

If you have a Beta version installed, that may be causing the problem, it would be best to install a release version of Windows, because the Insider builds do have bugs and if you need your PC to be stable, this is the best option.
___________________________________________________________________

Power to the Developer!

MSI GV72 - 17.3", i7-8750H (Hex Core), 32GB DDR4, 4GB GeForce GTX 1050 Ti, 256GB NVMe M2, 2TB HDD

此回复是否有帮助?

抱歉,这没有帮助。

太棒了! 感谢你的反馈。

你对此回复的满意度如何?

感谢你的反馈,它能帮助我们改进网站。

你对此回复的满意度如何?

感谢你的反馈。

Open Regedit.exe and go to this key:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\AppXSvc

Please post a screenshot of that key.

______________________________________________________________________________________________________
Ramesh, Windows Shell MVP 2003-2012.
If this post resolves your issue, pls mark it as an Answer.

此回复是否有帮助?

抱歉,这没有帮助。

太棒了! 感谢你的反馈。

你对此回复的满意度如何?

感谢你的反馈,它能帮助我们改进网站。

你对此回复的满意度如何?

感谢你的反馈。

* 请尝试更小页码。

* 请只输入数字。

* 请尝试更小页码。

* 请只输入数字。

 
 

问题信息


上次更新时间 2025/04/04 375 次浏览 适用于: