Get-AppxPackage is Not Recognized or Access is Denied

Published by Nyau Wai Hoe - Updated on

When you need to uninstall, reinstall, or re-register certain system apps on Windows 11 or Windows 10, a lot of people would use the Get-AppxPackage cmdlet. If you are entering a command that involves the Get-AppxPackage cmdlet and you see an error instead: “Get-AppxPackage is not recognized as an internal or external command, operable program or batch file” or “Get-AppxPackage: Access is denied”, this guide will explain why and show you how to sort out these problems.

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, so you should run it in the PowerShell, not the regular Command Prompt. The error “Get-AppxPackage is not recognized as an internal or external command” usually happens when you try to run it in the Command Prompt by mistake.

PowerShell vs. Command Prompt

PowerShell is a powerful tool for managing systems in Windows, shown in a blue console window, unlike the usual black window of the Command Prompt. The following will show you how they differ.

  • PowerShell is often in a blue console window. It has more advanced features for system management. You usually see a PS at the start of the prompt. Sometimes, it might be in a black window if it’s opened in the new Windows Terminal.PowerShell Windows 11
  • The Command Prompt is known for its black window. It’s simpler and used for basic Windows commands. The prompt often ends with a > symbol.Command Prompt Windows 11

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

Open PowerShell correctly

To prevent the “Get-AppxPackage is not recognized” error, make sure you open PowerShell the right way:

  1. Click “Start” at the bottom left of your screen.
  2. Type “PowerShell.” in the search bar.
  3. Look for options like “Windows PowerShell” or “Windows PowerShell (x86)” and pick the one that fits your system.
  4. Click the right PowerShell option to open it.Open Windows PowerShell via Start

Once you open PowerShell as described, you’ll be set to run the Get-AppxPackage command without the “not recognized” error.

How to fix the “Get-AppxPackage: Access is Denied” error

Even when you’re in PowerShell, you might still see the “Get-Appxpackage: Access is denied” error. This doesn’t happen because you’re in the wrong place, but because you might not have the right permissions to use the command.

Get-AppxPackage Access is Denied Windows 11

Why permissions are sometimes needed in PowerShell

Each command in PowerShell, especially those that change system settings or manage apps, needs certain permissions. These permissions make sure you don’t make changes to your system by accident or on purpose that you shouldn’t.

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

Run PowerShell as administrator

To have the right permissions:

  1. Press the Start button or Windows key on your keyboard.
  2. Type “PowerShell” in the search bar.
  3. Right-click “Windows PowerShell” from the results.
  4. Select “Run as administrator” from the menu.Windows 11 PowerShell Run as administrator

After this, you’ll see a prompt asking if you want to let the app make changes to your device. Click “Yes.”

Run PowerShell as Admin UAC Confirmation

Now, with admin rights, you can run the Get-AppxPackage command without the “Access is denied” error.

A word of caution

When using PowerShell with admin rights, be careful with the commands you use. These permissions allow you to make big changes to your system, some of which can’t be undone.


Nyau Wai Hoe
Nyau Wai Hoe is the Founder and Chief Editor of WindowsDigitals.com. 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