Hi All
Thought this would be easy .. and to pull back the SQL instance name and database names is precisely that.
SCOM2007R2
get-monitoringclass -name "Microsoft.SQLServer.2008.Database" | get-monitoringobject | Select Path, DisplayName
SCOM2012 beta
Get-SCOMClass -name 'Microsoft.SQLServer.2008.Database' | Get-SCOMClassInstance | Select Path, DisplayName | Sort -Property Path, DisplayName
But how can I get the RecoveryModel property back as well?
If I do a | export-csv then the resultant csv file shows that the Recovery Model property is listed as[Microsoft.SQLServer.Database].RecoveryModel but putting that in my Select statement doesn't work (I just get blank entries). I suspect that I might need
to link back up the class food chain to pull the Recovery Model property but wondered if there was an easier way.
Thanks!
Graham
New SCOM 2012 Blog! -
http://www.systemcentersolutions.com/blog/
View OpsMgr tips and tricks at
http://systemcentersolutions.wordpress.com/