Activating your SCOM 2012 license again

Hi friends. Because I get this question more often, lets paste the commands again to license your SCOM 2012 server.
First check your license status.
Open an Operations Manager Shell and type/paste:
Get-SCOMManagementGroup | ft skuforlicense, version, timeofexpiration –a
If you on an eval version you will see something like the following
scom
The word Eval gives it away, as well as an end-date within days to months.
What you need first it to find your System Center 2012 license somewhere. Once you have it you can apply it with another command – where the 99999 thing is of course to be replaced by your key:
Set-SCOMLicense -ProductId ‘99999-99999-99999-99999-99999’
Answer “Y” to confirm your action
Now you could get an error at this point looking like this:
scom
In a text version the most important pieces is this:
Set-SCOMLicense : Requested registry access is not allowed.
If you encounter this, just open a normal Powershell, but use the right-click and Run As Administrator. Next, because it is not an Operations Manager Shell you need to import the SCOM module first and next enter the command again.
Import-Module OperationsManager
Set-SCOMLicense -ProductId ‘99999-99999-99999-99999-99999’

Answer “Y” to confirm your action
After this restart your SCOM server and check the license status again.
scom
And there we go. It says retail and it is valid for a few more years, or at least longer than I expect to live B) Don’t look at the version, I was too lazy to wait for the reboot so took it off another server.
Hope this helps, also if you get that nice registry error again 🙂
Reference the MS KB article: http://support.microsoft.com/kb/2699998
Bob Cornelissen