I am writing a powershell script to figure out the CPU Utilization each stored procedure or SQL Query is taking. For that purpose I\'m figuring out the SQL Server threads whose