For your information, this is a PowerShell command that is basically used to reinstall (or can be said to fix) all preinstalled Windows apps.
As you know, PowerShell is the scripting language to ensure the automation of the management of the computer system. There are lots of commands to accomplish lots of tasks, maximum in the CI/CD environments.
In this article, you’ll know about this specific command including what is this used for and how to execute this in a proper way. So, without wasting time, let’s get into them.
What Is the Use of This Get-AppXPackage Command?
When there’s any problem with any Microsoft Store apps or the start menu isn’t responding as it should, this is the command to perform in the Windows PowerShell in order to solve it.
It is quite common to users that they have faced, at least for once, their preinstalled Store apps like Calendar, Calculator, Weather Report, and even Microsoft Edge not working properly (getting stuck, showing errors, etc). Sometimes a restart or power cycle is enough to solve the problem. But that is not either the permanent or prominent solution.
It is proved by numerous users that executing this Get-AppXPackage command in Windows PowerShell has successfully gotten them out of this mess. Moreover, when the start menu or taskbar starts to show such problems, the command also fixes them.
In short, performing this command is the best solution for any issues related to Microsoft Store apps, the Start menu, or pinned apps in the taskbar.
How to Execute This ‘Get-AppXPackage Foreach InstallLocation AppXManifest Xml’ Command Properly?
First of all, this is not the full form of this command. We’re going to provide the entire command later in this section. But before that, you need to know a crucial thing about executing this command.
Even though it seems quite normal as you can execute this like any other command. But the fact is to execute the command, first, you need to open the Windows PowerShell as administrator. Therefore, check the whole process –
Step 1: Go to the Windows search bar in the taskbar and search for PowerShell in it.
Step 2: From the result window, select the Run as administrator option.
Step 3: Now, when the PowerShell prompt appears, type or copy and paste the following command into it –
Get-AppXPackage -AllUsers | Foreach {Add-AppxPackage -DisableDevelopmentMode -Register “$($_.InstallLocation)AppXManifest.xml”}
Step 4: Finally, press Enter to execute.
Be patient and wait until the whole process has been completed.
Conclusion
This is all the standard information about this PowerShell command. Though the actual usage of this command is to reinstall or recover Microsoft apps, it also does some additional fixes this. But if you still have further queries regarding this topic, feel free to knock us in the comment section.