From LedHed's Wiki
If you get the following error when trying to activate Windows 2008 R2 against a Key Management Server (KMS) try the following:
http://support.microsoft.com/kb/2230957
If that doesn't work try running these commands:
slmgr.vbs /rilc slmgr.vbs /rearm
Restart
slmgr.vbs /ato