Discovered Inventory with SCOM (2007 and 2012)

Today I needed to find the discovered inventory for all of the Servers that were running a Windows 2008, IIS WebServer. So the first thing I needed to do is find out what the Class was that I needed for my query.

For that, I started with a generic query to find out what IIS Classes there were…

get-monitoringclass | ? {$_.Name -like “*Internet*”} | select Name

Looking at the output, I decided the most likely Class was “Microsoft.Windows.InternetInformationServices.2008.WebServer”. Using this class, I could now find out what servers were running an Windows 2008, IIS WebServer.

Get-MonitoringClass -name “Microsoft.Windows.InternetInformationServices.2008.WebServer” | Get-MonitoringObject | Select Path

 

 

In SCOM 2012 its similar but slightly different as the cmdlet names have changed.

Get-SCOMClass –name “Microsoft.Windows.InternetInformationServices.2008.WebServer” | Get-SCOMClassInstance | Select Path

 

 

If you want to find out how many items you have discovered, you can wrap this all up in parenthesis and look for the count.

For SCOM 2007:

(Get-MonitoringClass -name “Microsoft.Windows.InternetInformationServices.2008.WebServer” | Get-MonitoringObject | Select Path).count

 

For SCOM 2012:

(Get-SCOMClass –name “Microsoft.Windows.InternetInformationServices.2008.WebServer” | Get-SCOMClassInstance | Select Path).count

 

 

 
Comments

No comments yet.

Leave a Reply