Fix it now
Microsoft documents 0xC004F025 as access denied because the requested action requires elevated privileges, with running the command in a normal rather than an elevated Command Prompt as the cause. Nothing is wrong with the licence, the key or the network. Fixing it costs nothing.
cscript //nologo %windir%\system32\slmgr.vbs /ato
cscript //nologo %windir%\system32\slmgr.vbs /dli
- Confirm the window is actually elevated. The title bar says Administrator; a window opened from a shortcut or a file manager usually is not.
- Re-run whatever failed. If it now succeeds, that was the whole problem.
- If Run as administrator asks for someone else’s credentials, your account is not a local administrator. Check with
net localgroup Administrators. - For anything involving a digital licence, also make sure you are signed in with the Microsoft account that holds the entitlement. Administrator rights alone are not enough, and the troubleshooter needs both.
There is nothing to buy here. If somebody is offering you a licence to clear one of these codes, they have not read the error.
If the elevated window fixes it, you can stop here. If it does not, the next section covers the second permission that catches people out.
Why it happens
Activation writes to the protected licence store and touches a system service, so the licensing service refuses anything that does not arrive with administrative rights. A standard user can read the activation state and see the same error messages, which is why the failure reads as a licensing problem rather than a permissions one. Microsoft documents 0xC004F025 as access denied, requiring elevated privileges, and gives the cause as using a regular Command Prompt window instead of an elevated one. 0x80070005 is documented with the same meaning.
Microsoft’s slmgr reference is precise about which operations need elevation and which do not, and that split is the fastest diagnostic in this article. /dli, /dlv and /xpr are documented as not requiring elevated privileges. /ipk, /upk, /cpky, /rilc, /rearm and online /ato all do. If the read-only commands work and the write commands fail, you have a permissions problem and nothing else.
There is a second permission that is unrelated to the first. Recovering or transferring a digital licence needs the Microsoft account that holds the entitlement, and Microsoft states the activation troubleshooter works only with the connected account – while separately requiring that you be signed in as an administrator to use it at all. An administrator signed in with the wrong account gets past the elevation check and is refused at the entitlement check, which produces a very similar-looking failure.
The command prompt was not elevated
You have this one if The command returns an access error immediately and the window title does not say Administrator.
- Close the window. Press Start, type
cmd, right-click Command Prompt and choose Run as administrator. - Confirm the title bar now includes Administrator.
- Re-run the command that failed.
The same applies to PowerShell and Windows Terminal. Opening a terminal from a file manager or a pinned shortcut usually does not elevate it.
The signed-in account is not an administrator
You have this one if Choosing Run as administrator asks for someone else’s credentials, or offers nothing at all.
- Check membership:
net localgroup Administratorsand look for your account. - Sign in with an account that is listed, or have an administrator enter their credentials at the prompt.
- On a home machine, add the account through
Settings > Accounts > Other usersusing an existing administrator.
The wrong Microsoft account is signed in
You have this one if You are elevated, the operation still fails, and it involves recovering or transferring a digital licence.
- Check which account is in use under
Settings > Accounts > Your info. - Sign in with the personal Microsoft account that holds the licence.
- Repeat the troubleshooter from
Settings > System > Activation, still signed in as an administrator.
A work or school account and a personal Microsoft account are separate identities. Being an administrator under one does not give you the other’s entitlements.
The device is centrally managed
You have this one if The machine belongs to an organisation and the activation controls are unavailable rather than merely failing.
- Confirm the management state under
Settings > Accounts > Access work or school. - Raise the activation problem with whoever administers the device rather than attempting it locally.
- Where activation is handled by a volume mechanism, it will be resolved centrally rather than on this machine.
The licensing service is not running
You have this one if Elevation is clearly working, but every licensing command fails regardless of the account used.
- Check the Software Protection service:
sc query sppsvc. - Start it if it is stopped, and confirm its startup type is automatic with a delayed start.
- Re-run the activation command once the service is running.
Full reference
Which slmgr operations need elevation
| Command | Elevation documented as required |
|---|---|
slmgr /dli |
No |
slmgr /dlv |
No |
slmgr /xpr |
No |
slmgr /ipk <key> |
Yes |
slmgr /ato |
Yes for online activation; KMS activation does not require it |
slmgr /upk |
Yes |
slmgr /cpky |
Yes |
slmgr /rilc |
Yes |
slmgr /rearm |
Yes |
slmgr /skms, slmgr /ckms |
Yes |
Microsoft’s reference notes that several of these can alternatively be permitted through the Standard User Operations configuration, which is how organisations allow specific licensing operations without handing out administrator rights. If you are building a task sequence or a support script, that is the supported route rather than running everything as an administrator.
Which permission is missing
| What you see | What is missing |
|---|---|
| No consent prompt when you choose Run as administrator | The account is not a local administrator |
| The prompt asks for another account’s credentials | You are a standard user; an administrator must approve |
| Elevation works but activation still fails identically | The signed-in Microsoft account does not hold the entitlement |
| The activation page shows options greyed out | The device is managed and activation is controlled centrally |
| The error only occurs from a script or scheduled task | The task is running in a context without elevation |
/dlv works and /ipk fails |
A textbook elevation problem, and nothing else |
Running activation from a script or task
- Configure the scheduled task to run with the highest privileges, under an account with administrative rights. A task set to run as the logged-on user without elevation produces exactly this error.
- Use the cscript form so the result is written to the console and can be captured:
cscript //nologo %windir%\system32\slmgr.vbs /ato. - Do not loop. Windows retries activation on its own schedule, and a script that forces it repeatedly adds nothing except further failures.
- Log the exact code rather than the exit status. The codes in this family are distinguishable and the exit status is not.
- For fleets, consider the Standard User Operations configuration rather than granting administrator rights for the sake of one command.
The codes in this family, and how much weight to give them
Only 0xC004F025 is published, and 0x80070005 carries the same documented meaning for activation. The other four in this record – 0x803FABBB, 0x803FABBF, 0x803F9006 and 0xC004D314 – are not published by Microsoft, so no article can tell you which specific right is missing from the number alone. Use the elevation split above instead: it is documented, it takes ten seconds, and it distinguishes the two permissions this article is about.
Every code this article covers
| Code | What it points at | Source |
|---|---|---|
0x803FABBB |
Seen from the Settings activation client when an operation is refused. No published meaning; check elevation and the signed-in Microsoft account | not published by the vendor |
0x803FABBF |
A related refusal from the same client. No published meaning | not published by the vendor |
0x803F9006 |
Raised when a licensing operation is blocked by the rights or identity of the caller. No published meaning | not published by the vendor |
0xC004F025 |
Access denied: the requested action requires elevated privileges. The documented cause is using a normal rather than an elevated Command Prompt | Microsoft Learn |
0xC004D314 |
Reported by the protected licensing store about the context a call was made in. No published meaning | not published by the vendor |
Confirm the fix worked
- The command prompt title bar includes Administrator before you re-run anything.
slmgr /atocompletes without an access error.slmgr /dlireports Licence Status: Licensed.- For an account-linked licence,
Settings > System > Activationshows the Microsoft account you expect.
Questions people ask about this
Does this cost anything to fix?
No. Nothing here is a licensing problem, so there is nothing to buy. You need an administrative account on the machine, and for account-linked licences the right Microsoft account signed in. Both are free.
Why does slmgr not just say I need to be an administrator?
It reports the code it received from the licensing service, and that service returns an access-denied result rather than an explanation. Microsoft documents 0xC004F025 as exactly that, with an unelevated Command Prompt as the cause. Running it elevated and watching the error disappear is the quickest confirmation.
Which commands actually need elevation?
Microsoft documents /dli, /dlv and /xpr as not requiring it, and /ipk, /upk, /cpky, /rilc, /rearm and online /ato as requiring it. If the read commands work and the write commands fail, you have your answer.
Can I activate from a scheduled task or script?
Yes, provided the task runs with the highest privileges under an account with administrative rights. A task configured to run as the logged-on user without elevation produces this error every time. For fleets, the Standard User Operations configuration is the documented alternative to handing out admin rights.
I am the only user on my home PC. Why am I not an administrator?
You usually are, but an account can have been created as a standard user, or the machine may have been set up by someone else. Run net localgroup Administrators and check rather than assuming.
