How to Fix Get-AppxPackage Access Is Denied Error in Windows 11: Step-by-Step Solution

When using Windows 11, you might encounter the “Get-AppxPackage Access Is Denied” error. This error can prevent you from managing or reinstalling built-in apps through PowerShell. It usually relates to permission or system policy issues.

Fixing this problem involves a few straightforward steps. You don’t need to be an expert to follow along, as each step is explained in simple terms. Whether you’re trying to reinstall apps or troubleshoot, this guide will walk you through the process.

By the end, you’ll understand why this error occurs and how to fix it using basic Windows tools. Let’s get started with some quick notes before diving into the solutions.

This guide is designed to help you solve the error safely without risking your system stability.

Quick Note Before You Begin

  • Administrator Access: Make sure you are logged in with an administrator account. Many of the fixes require admin rights.
  • Windows Updates: Check if your Windows 11 is up to date. Sometimes, updates fix system bugs causing permission errors.
  • Backup Important Data: Although these steps are safe, it’s always wise to back up important files before making system changes.
  • PowerShell Version: Use Windows PowerShell or Windows Terminal with administrative privileges for all commands.

Step 1: Run PowerShell as Administrator

One of the most common reasons for the “Access Is Denied” error is not having enough permissions. To fix this, you need to run PowerShell with elevated rights.

  1. Click the Start button or press the Windows key.
  2. Type PowerShell in the search bar.
  3. Right-click on Windows PowerShell or Windows Terminal and select Run as administrator.
  4. When the User Account Control (UAC) prompt appears, click Yes to allow admin access.

Running PowerShell as an administrator ensures you have the necessary permissions to execute commands that modify system apps.

Step 2: Check Execution Policy Settings

Windows PowerShell has execution policies that control the running of scripts. Sometimes, restrictive policies lead to access errors.

  1. In the elevated PowerShell window, type the following command and press Enter:
Get-ExecutionPolicy

If the policy is set to Restricted, you need to change it temporarily.

  1. Run this command to allow script execution:
Set-ExecutionPolicy RemoteSigned -Scope CurrentUser

This setting allows PowerShell to run scripts created locally or signed by trusted publishers, helping avoid permission issues.

Step 3: Take Ownership of the Package Folder

The error might also occur because your user account doesn’t have ownership of certain app folders.

  1. Open File Explorer and navigate to the folder:
C:Program FilesWindowsApps

Note: This folder is hidden and protected. To see it, you must enable viewing hidden files and uncheck “Hide protected operating system files” in Folder Options.

  1. Right-click on the WindowsApps folder and select Properties.
  2. Go to the Security tab and click Advanced.
  3. Next to the Owner label, click Change.
  4. Type your Windows username, click Check Names, then OK.
  5. Check the box that says Replace owner on subcontainers and objects, then click Apply and OK.

Taking ownership allows your account to access and modify the app files, which can resolve permission errors.

Step 4: Re-register All Built-in Windows Apps

Sometimes, apps get corrupted or unregistered, causing the access denied error. Re-registering the apps can fix this.

  1. Open PowerShell as administrator (as shown in Step 1).
  2. Type the following command and press Enter:
Get-AppxPackage -AllUsers | Foreach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)AppXManifest.xml"}

This command re-installs and registers all built-in apps for all user accounts. It helps fix errors related to app packages.

Step 5: Disable Antivirus or Third-party Security Software Temporarily

Sometimes, antivirus or other security software may block PowerShell from accessing certain folders.

  • Temporarily disable any third-party antivirus or security programs.
  • Try running the PowerShell commands again.
  • Remember to re-enable your antivirus after the process.

This step is important because security software might interfere with system-level commands.

Alternative Method: Use the System File Checker (SFC) Tool

If the above steps don’t work, corrupted system files could be the cause. Running the System File Checker can repair these files.

  1. Open PowerShell or Command Prompt as administrator.
  2. Type the following command and press Enter:
sfc /scannow

The scan will take some time. It automatically detects and fixes corrupted system files, which may resolve the access denied error.

Frequently Asked Questions (FAQs)

Why am I getting “Access Is Denied” when running Get-AppxPackage?

This usually happens because you are not running PowerShell with administrator privileges or your user account lacks necessary permissions to access app folders.

Can I fix this error without administrator access?

No. Administrator rights are required to modify system app packages, so you must have an admin account to fix this issue.

Is it safe to take ownership of the WindowsApps folder?

Yes, but be careful. Changing ownership allows you to modify app files. Only do this if necessary, and avoid deleting or altering critical files.

Why does re-registering apps help?

It refreshes the installation state of built-in apps, fixing any broken or missing components causing errors.

Will disabling antivirus put my computer at risk?

Temporarily disabling antivirus is generally safe if done briefly during troubleshooting. Always re-enable it immediately after.

When Nothing Works

If you have tried all the above steps and still face the “Access Is Denied” error, consider the following options:

  • Use the Windows Troubleshooter: Go to Settings > System > Troubleshoot > Other troubleshooters and run the relevant troubleshooters.
  • Create a New User Account: Sometimes user profiles get corrupted. Creating a new admin account may help.
  • Reset or Repair Windows: Use the Reset this PC feature in Settings to refresh your system without losing files.
  • Visit Official Microsoft Support: Check Microsoft Support for detailed help and updates.

Conclusion

The “Get-AppxPackage Access Is Denied” error in Windows 11 is typically caused by permission issues or corrupted app registrations. By running PowerShell as an administrator, adjusting execution policies, taking folder ownership, and re-registering apps, most users can resolve the issue easily.

Always start with the simplest steps and gradually move to more advanced ones. If needed, tools like System File Checker can fix deeper system problems. Remember to be cautious when changing system settings and create backups when possible.

Following this step-by-step guide will help you regain control over your Windows apps and fix the access denied error efficiently.

Leave a Reply