StevensNet.com

...Because someone's gotta tell the story...

Blogs

To return to the main Blog List, click Full Blog Listing.

Tags

Apple
PowerShell
SCCM
SQL
System Center

Reporting/Inventory the SQL edition in SCCM (Part 1)

Monday, August 24, 2015 in System Center (Views: 2148)

Something that has been complained about constantly but Microsoft never actually done anything about is SQL editions. You install it, and no matter which edition (Standard, Enterprise, Developer), it looks the same in Add/Remove Programs – the version numbers are the same in file properties. There are no giveaways – and look online for a solution, there are none, until now. :)

First, we will be using Compliance Settings or what used to be called DCM to do this. In order to start this, I will be taking advantage of PowerShell and the Invoke-SQLCMD applet.

Next, we need to create a CI, using a scripting method – using this script:

$a = Invoke-Sqlcmd -Query "select Serverproperty ('edition')"
$b=$a.Column1
if ($b -like "*Enterprise*") {Write-Host "Enterprise"}
elseif ($b -like "*Standard*") {Write-Host "Standard"}
elseif ($b -like "*Developer*") {Write-Host "Developer"}




Then, we will need to set the rule for this, and since an edition of SQL can't be all of the above (will return non-compliant), we need to set an existence parameter instead, as such…



We then add this to a baseline, and presto – we can now inventory the SQL edition in SCCM. In Part 2, I will describe how to report on this data.

 

Related Blogs You May Be Interested In:


To leave a comment, please log in and/or register.