Access denied (0xC0000022) when trying to activate Windows with slmgr.vbs -skms / slmgr.vbs -ato


When attempting to active a Windows 2008 server with slmgr, you get the following error message:


Both errors (0xC0000022) are “Access Denied” errors.

Make sure the service is running as a “Network Service” account and that you have administrative access (local admin) especially if you try to activate a remote machine.

If you changed the account the service is running with, restart the service and it should be fixed.