Sunday 10 April 2011

Counting SCOM / System Center Operations manager Enterprise Licences

SCOM 2007 has a builtin license report. Unfortunately if you override discoveries to remove 'enterprise ML liable' objects it is never reflected in this report so it always overstates your license count.

say for example you override exchange or sql MP so the exchange/sql objectss are not discvered it will still report these as enterprise license objects if they ever were discvoered at some point. I think this might be a problem that report can't tell between current and past licenses for an object. no matter how many objects of type Microsoft.SystemCenter.License.Enterprise you actually have in 'dicovered inventory'....

I've created a powershell script to spit out the objects right now that are the class objects for standard and enterprise liceses which is a 100% accurate count of what licenses you are really using right now.

############ Licencing ########################
$myclasses = "Microsoft.SystemCenter.License.Standard","Microsoft.SystemCenter.License.Enterprise"
foreach ($classname in $myclasses )
{ # get class
 $instances = get-monitoringClass -name $classname
 # get list as a string sorted by name and remove text that prefixes each name for some reason.
 $mylist = $instances | get-monitoringObject | select-object pathName | Sort-Object  pathname | out-string | foreach {$_ -replace "$classname3a","" }
 # output
 $mylist | foreach {$_ -replace "2d","-"} > c:\temp\SCOM_License_$classname.txt
}