Get-AppxPackage is Not Recognized or Access is Denied

Published by Nyau Wai Hoe - Updated on

When you’re working with system apps on Windows 11 or Windows 10 and need to do things like uninstalling, reinstalling, or fixing them, you might use the Get-AppxPackage cmdlet. It’s a command in PowerShell that’s really handy, especially if you’re trying to fix the Microsoft Store app. But if you’re new to typing commands, you might run into errors. Two common ones are “Get-AppxPackage is not recognized as an internal or external command, operable program or batch file” and “Get-AppxPackage: Access is denied.” Don’t worry though, these issues can be fixed pretty easily.

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

The thing is, Get-AppxPackage is meant for PowerShell, not the regular Command Prompt. The error “Get-AppxPackage is not recognized as an internal or external command” usually pops up when you try running it in Command Prompt by mistake. To fix this, it’s important to know the difference between PowerShell and Command Prompt and make sure you’re using the right one.

PowerShell vs. Command Prompt

PowerShell is this cool command-line tool and scripting language made for more complex system management tasks. It’s the one with a blue window, unlike the Command Prompt’s black window. Here’s a quick breakdown:

  • PowerShell: You’ll see it in a blue window most of the time, offering lots of scripting functions and a wide range of commands for managing your system. It usually starts with PS. But, it might also appear in a black window if it’s opened in the new Windows Terminal.PowerShell Windows 11
  • Command Prompt: This one’s the classic black window used for basic Windows commands. Its prompt ends with a > symbol.Command Prompt Windows 11

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

Opening PowerShell correctly

To avoid the “not recognized” error, make sure you’re in PowerShell. Here’s how to open it right:

  1. Hit the “Start” button or the Windows key.
  2. Type “PowerShell” in the search bar.
  3. Look for “Windows PowerShell” or “Windows PowerShell (x86)” in the results and pick the one for your system (most of us use the standard “Windows PowerShell”).
  4. Click on it to open.Open Windows PowerShell via Start

Once you’ve got PowerShell open as described, you’ll be all set to use the Get-AppxPackage command without that pesky error.

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

Even in PowerShell, you might hit the “Get-Appxpackage: Access is denied” error. This isn’t about being in the wrong place, but about needing the right permissions to run the command.

Get-AppxPackage Access is Denied Windows 11

Why permissions matter in PowerShell

In PowerShell, commands that change system settings or manage apps need specific permissions. This is to make sure no one makes unwanted or harmful changes to your computer.

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

Running PowerShell as administrator

To get the permissions you need:

  1. Click Start or press the Windows key.
  2. Type “PowerShell” in the search bar.
  3. Right-click on “Windows PowerShell” in the results.
  4. Select “Run as administrator”.Windows 11 PowerShell Run as administrator

Doing this, you’ll see a prompt asking if it’s okay to make changes to your device. Click “Yes”.

Run PowerShell as Admin UAC Confirmation

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

A word of caution

When using PowerShell with admin rights, be careful with the commands you use. Having more control means you can make big changes, some of which can’t be undone.

What we’ve learned

The Get-AppxPackage command in PowerShell is really useful, but be sure to use it in the right place and with the right permissions. Make sure you’re in PowerShell, not Command Prompt, run it as an admin when you need to, and always be careful with the commands you use.

If you’re ever unsure about a command or see an error you don’t recognize, it’s a good idea to look up more information or ask for help to avoid mistakes.


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