locked
Need powershell script to monitor sql server cpu hike and capture the top 10 cpu consuming queries RRS feed

  • Question

  • Need powershell script to monitor sql server cpu hike and capture the top 10 cpu consuming queries.

    I have 100+ servers, from the central server, if i could configure the powershell that runs on all 100 servers remotely every 10 minutes and capture the details in HTML format and send to my email id .Could any one help me to get the logic or script which will help me lot.


    vijayasarathi

    Wednesday, January 31, 2018 11:49 AM

All replies

  • This forum does not create PowerShell scripts for you, we help with specific issues with scripts. Please check the scripting request forum or the gallery. Or maybe even a Google?

    What have you tried so far and what errors are you getting?


    Wednesday, January 31, 2018 12:21 PM
  • This could be your start

    get-counter -Counter "\Processor Information(*)\% Processor Time"

    By "-computername" you could read the remotely.

    Just validate shall you run that remotely or should you use invoke-command -computer...


    Petri

    • Proposed as answer by Mike Crowley Wednesday, January 31, 2018 3:31 PM
    Wednesday, January 31, 2018 12:28 PM
  • Please carefully review the following to set your expectation of technical forums.

    This Forum is for Scripting Question Rather than script requests

    Script Gallery.

    Learn PowerShell  

    Script requests


    \_(ツ)_/

    Wednesday, January 31, 2018 7:24 PM