Activating a de-activated Evaluation SCOM 2012 instance

Came along a SCOM 2012 R2 instance which was expired. The license key was not entered on time, so SCOM did not work anymore and the SDK refused connection. Look in the event log and you will see that your evaluation version has expired and you need to enter your key. The thing is that you connect to SCOM through the Shell to activate it and it refuses connection at that point.
The trick is to restart the SDK service and quickly enter the production key.
Just open a normal PowerShell in administrator mode on the SCOM server and throw these three commands in there:
restart-service -name omsdk
import-module operationsmanager
set-scomlicense -productid XYZXX-XYZXX-XYZXX-XYZXX-XYZXX -confirm:$false

Of course use the real product key in there where the X’s are!
Have fun and good luck!
Bob Cornelissen