Get-AppxPackage is Not Recognized or Access is Denied

Published by Nyau Wai Hoe - Updated on

When managing system apps on Windows 11 or Windows 10, particularly to uninstall, reinstall, or re-register them, a common tool many turn to is the Get-AppxPackage cmdlet. This PowerShell command is particularly useful for tasks like resetting the Microsoft Store app. However, for users who are new to entering commands, it’s not uncommon to run into errors. Two of the most frequently encountered messages include “Get-AppxPackage is not recognized as an internal or external command, operable program or batch file” and “Get-AppxPackage: Access is denied.” These errors can be puzzling, but the good news is they are easy to resolve. In this article, we’ll guide you through the steps to address and rectify these issues.

Also see: Fixing Microsoft Store Error on Windows 11 or 10

Get-AppxPackage is not recognized as an internal or external command

Get-AppxPackage is not recognized as an internal or external command

Get-AppxPackage is a PowerShell cmdlet, which means it should be executed within the PowerShell environment, not the standard Command Prompt. The “Get-AppxPackage is not recognized as an internal or external command” error often occur when users mistakenly attempt to run Get-AppxPackage in the Command Prompt. To resolve the “not recognized” issue, it’s crucial to distinguish between PowerShell and Command Prompt and ensure you’re working in the right environment.

PowerShell vs. Command Prompt

PowerShell is a versatile command-line shell and scripting language designed for advanced system management tasks. It is represented by a blue console window, which is typically different from the familiar black Command Prompt window. Here’s a quick comparison:

  • PowerShell: Usually displayed in a blue console window. It offers advanced scripting capabilities and a broader range of commands, making it suitable for system administration tasks. The prompt typically starts with PS. It’s worth noting that PowerShell may still appear in a black console window if it is opened in the new Windows Terminal.PowerShell Windows 11
  • Command Prompt: Familiar as the classic black console window. It’s more basic and primarily used for executing standard Windows commands. The prompt usually ends with a > symbol.Command Prompt Windows 11

Related resource: Add Folder to Path Environment Variable in Windows 11/10

Opening PowerShell correctly

To resolve the “Get-AppxPackage is not recognized” error, you must ensure that you are working within the PowerShell environment. Follow these steps to correctly open PowerShell:

  1. Click “Start” in the Windows taskbar (usually located at the bottom left corner of your screen).
  2. In the search bar, type “PowerShell.”
  3. From the search results, you will see options like “Windows PowerShell” or “Windows PowerShell (x86)”. Choose the one that suits your system (most users will select the standard “Windows PowerShell”).
  4. Click on the appropriate PowerShell option to open it.Open Windows PowerShell via Start

After opening the correct PowerShell window as instructed, you will be ready to execute the Get-AppxPackage command without encountering the “not recognized” error.

Addressing the “Get-AppxPackage: Access is Denied” error

Even after making sure you’re in PowerShell, you might still come across the “Get-Appxpackage: Access is denied” error message. This error doesn’t stem from using the wrong environment, but rather from not having the proper permissions to execute the command.

Get-AppxPackage Access is Denied Windows 11

Why permissions matter in PowerShell

Every command in PowerShell, especially those that modify system settings or manage apps, requires a certain level of permissions. These permissions ensure that unintentional or malicious changes aren’t easily made to your system.

Useful tip: Run CMD, PowerShell or Regedit as SYSTEM or TrustedInstaller in Windows 11

Running PowerShell as administrator

To ensure you have the necessary permissions:

  1. Click on the Start button or press the Windows key on your keyboard.
  2. In the search bar, type “PowerShell”.
  3. From the results, right-click on “Windows PowerShell”.
  4. Choose “Run as administrator” from the context menu.Windows 11 PowerShell Run as administrator

With these steps, you should see a User Account Control (UAC) prompt asking if you want to allow the app to make changes to your device. Click “Yes”.

Run PowerShell as Admin UAC Confirmation

Now, with administrative privileges, you should be able to run the Get-AppxPackage command without encountering the “Access is denied” error.

A word of caution

When running PowerShell as an administrator, always be cautious about the commands you enter. Elevated permissions mean you have the ability to make significant changes to your system, some of which might be irreversible.

Concluding remarks

While the Get-AppxPackage cmdlet in PowerShell is a powerful tool, it’s crucial to be aware of the environment you’re working in and the permissions required. Remember:

  • Always ensure you’re using PowerShell and not Command Prompt for commands specific to the former.
  • When elevated permissions are needed, always Run PowerShell as an administrator.
  • And lastly, always approach commands with caution, especially when you have administrative rights.

As always, if you’re unsure about a command or face an unfamiliar error, seeking advice or further reading can prevent potential mistakes.

Nyau Wai Hoe
Nyau Wai Hoe is the Founder and Chief Editor of With a degree in software engineering and over 12 years of experience in the tech support industry, Nyau has established himself as an expert in the field, with a primary focus on the Microsoft Windows operating system. As a tech enthusiast, he loves exploring new technologies and leveraging them to solve real-life problems.

Share via
Copy link