Windows Server 2008 R2 does not ask for a CD key in setup, and it can be run for 30 days for free before needing to be active. You can continue to use it after 30 days trial but the system will reboot every 2 hours and run with reduced functionalities.
If you want to evaluate or run testing on a server with Windows Server 2008 R2 installed. The following procedures will walk you through the steps to extend your grace period.
Re-arm windows
Type in the following from an elevated command prompt:
slmgr.vbs –rearm
This will reset the activation expiration and the machine is good for another 30 days. You can do this up to 3 times and get 120 days free trial in total.