How can I reinstall or re-register Microsoft Store with PowerShell?

0
0
Asked By VelvetCactus42 On

I'm trying to restore Microsoft Store with this PowerShell command:

Get-AppxPackage -AllUsers Microsoft.WindowsStore* | ForEach-Object { Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)AppXManifest.xml" }

This worked on a previous Windows installation, but now it fails with: "Cannot find path 'C:AppXManifest.xml' because it does not exist." I'd like to reinstall or re-enable Microsoft Store by any reliable method, whether that's PowerShell, a batch command, or another built-in tool. What is causing the missing path, and what should I try?

3 Answers

Answered By AmberKite58 On

If the Store was removed with a third-party uninstall utility, the original package may no longer be present for all users. In that case, re-registering cannot work until the package is restored; use `wsreset.exe -i` or a working package installer instead.

Answered By QuietHarbor6 On

The error means the pipeline is reaching Add-AppxPackage with an empty or invalid InstallLocation, so it constructs `C:AppXManifest.xml`. Run the commands separately to confirm whether Get-AppxPackage actually finds a Microsoft Store package. If it returns nothing, there is no package available to re-register, and you’ll need to reset or reinstall the Store rather than use Add-AppxPackage directly.

Answered By OrbitMango7 On

Try resetting or reinstalling the Store with the built-in installer instead of registering a package whose InstallLocation may be empty. Run `wsreset.exe -i`, then wait for the installation to finish. If winget is available, you can also try installing Microsoft Store from the Microsoft Store source.

PineEcho19 -

The command I’ve used is `wsreset.exe -i`. On systems where winget is working, installing the Microsoft Store package from the Microsoft Store source can also restore it.

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.