how to fix : access denied in administrator power shell?

Paul Hardy 0 Reputation points
2025-12-09T18:36:14.5266667+00:00

when I run Get-AppxPackage Microsoft.YourPhone -AllUsers | Remove-AppxPackage in administrator power shell, windows 11, I get : access denied. How do I resolve this?

Windows for home | Windows 11 | Connect Phone and PC
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Q&A Assist
    2025-12-09T18:37:25.0933333+00:00
    AI generated content. This question contains an answer created with AI from Q&A Assist. Learn more

    To resolve the "Access Denied" error when trying to run the Remove-AppxPackage command in PowerShell, ensure that you are running PowerShell with elevated permissions (as an administrator). Here are some steps you can follow:

    1. Run PowerShell as Administrator:
      • Right-click on the Start menu or press Win + X.
      • Select Windows PowerShell (Admin) or Windows Terminal (Admin).
      • If prompted by User Account Control, click Yes to allow.
    2. Check User Permissions: Ensure that your user account has administrative privileges. If you are not an administrator, you will need to log in with an account that has these permissions.
    3. Use the Correct Command: Make sure you are using the correct command syntax. The command you provided seems correct, but ensure there are no typos.
    4. Check for NonRemovable Apps: Some apps cannot be removed if they are marked as non-removable. You can check this by running:
         Get-AppxPackage -Name Microsoft.YourPhone | Select-Object -Property Name, NonRemovable
      
      If the NonRemovable property is set to True, you will not be able to remove it.
    5. Try Removing for Current User: If you are still facing issues, try removing the app only for the current user:
         Get-AppxPackage Microsoft.YourPhone | Remove-AppxPackage
      

    If you follow these steps and still encounter issues, it may be helpful to check if any security software is blocking the command or if there are group policies in place that restrict app removals.


    References:

    0 comments No comments

  2. Harold Milan 12,515 Reputation points Independent Advisor
    2025-12-09T19:15:05.02+00:00

    Hi,

    can I ask some question before we go deeper
    Are you on Windows 11 Home, Pro, or Enterprise, and which build?

    Is this PC personal or managed by your organization?

    Does the error say Access Denied immediately, or after listing the package?

    Once I have that info, I’ll be happy to share some steps that might help resolve the issue.

    Feel free to reply anytime I'm here to help!

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.