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

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.