Why Does the “Required Privilege” Error Occur?
If you use the Command Prompt (cmd.exe) or PowerShell in Windows 11, you may occasionally encounter the error message: “A required privilege is not held by the client.” (Error code 0x80070522). This error typically occurs when you are trying to execute a command that modifies protected system files, creates symbolic links, copies files into restricted directories (like C:\Windows or C:\Program Files), or changes system registry keys. Even if your Windows user account is designated as an Administrator, Windows 11 security features, specifically User Account Control (UAC), prevent standard command-line sessions from automatically executing these high-level actions to protect your system from malicious software.
The Solution: Run as Administrator
To resolve this error, you do not need to change file permissions or modify registry settings. You simply need to launch the Command Prompt or PowerShell with elevated administrative privileges. This tells Windows that you intentionally want to perform a high-level action.
Method 1: Using the Start Menu
- Click the Start Menu icon on your taskbar or press the Windows key.
- Type cmd (or PowerShell) into the search bar.
- In the search results, right-click on the Command Prompt app.
- Select Run as administrator from the context menu.
- If the User Account Control (UAC) prompt appears asking “Do you want to allow this app to make changes to your device?”, click Yes.
- You can now run your command again, and the error will be gone.
Method 2: Using a Keyboard Shortcut
If you prefer using keyboard shortcuts for faster navigation:
- Press the Windows Key + R to open the Run dialog box.
- Type cmd into the text field.
- Instead of pressing Enter, press and hold Ctrl + Shift + Enter simultaneously.
- Click Yes on the UAC prompt to open the elevated window.
How to Verify You Have Elevated Privileges
It is easy to tell if you have successfully opened an elevated session. Look at the title bar at the very top of the Command Prompt window. If it simply says “Command Prompt,” you are running a standard session. If it says “Administrator: Command Prompt,” you have successfully elevated your privileges and will no longer see the “privilege not held” error.