I have a headless windows server 2008 R2 running, and obviously I forgot to enable remote administration. Every attempt to connect via remote desktop, even with the administrator user, is currently rejected because remote desktop isn't licenced. Which is correct, because I don't need it on that mashine, just should be able to configure the system from time to time.
So I'm a bit lazy: I don't want to shut down the system, carry it over to some place with monitor and keyboard, change the configuration, shut it down again and carry it back.
Is there a way to remotely connect to the machine and activate the remote administration via network, so that I can connect again?
It sounds like you've installed the Remote Desktop Services role (formerly known as "Terminal Services in Application Mode"), the 60-days grace period has passed and you are lacking a Licensing Server. Although I'd think that even in this case you should be able to connect and log on as a member of the Administrators group regardless of your licensing status, there are some things you might want to try:
You can do this easily by running your regedit on any PC on the same subnet. Connect to the Remote Registry, select the target server and Edit the HKLM\System\Control\CurrentControlSet\Terminal Server which has a key fDenyTSConnections value from 1 to 0.
You will need to reboot the remote machine in order for this to take effect, so on the same machine you ran regedit load a command line and issue the shutdown command targeting the remote machine using the -r switch.