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.
Type in the following from an elevated command prompt:
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.
Or you can
Use Windows Server 2008 R2 Editions 180day Evaluation Key
Windows Web Server 2008 R2 = KBV3Q-DJ8W7-VPB64-V88KG-82C49
Windows Server 2008 R2 Standard = 4GGC4-9947F-FWFP3-78P6F-J9HDR
Windows Server 2008 R2 Enterprise = 7PJBC-63K3J-62TTK-XF46D-W3WMD
Windows Server 2008 R2 Datacenter = QX7TD-2CMJR-D7WWY-KVCYC-6D2YT
Important: Technically there’s nothing to stop you from using any evaluation software in production. But Microsoft EULA explicitly prohibits that. Once you move into production from evaluation, you need to get a license.