cloudadministrator.net
SQL queries for SCOM and PowerShell script for monitor performance counters
Here are the two scripts: SQL queries to get data from SCOM Databases: PowerShell script to get CPU, Memory and Storage performance values: