Script for CPU & Memory Threshold

Home Forums Scripting PowerShell Script for CPU & Memory Threshold

This topic contains 2 replies, has 3 voices, and was last updated by  dadosh 1 year, 1 month ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts

  • makavelli12
    Member
    #167287

    Dear All,
    am a basic user of PowerShell and do not really know how I can achieve the following and be grateful for any guidance/assistance:

    Have a list of Windows Server 2008 / 2012 R2
    Would like to be informed via email when one of the Server´s CPU and/or Memory Usage reaches a threshold of 85%

    I have seen there are some scripts which provide a current usage of CPU or Memory but not both and when they reach a certain threshold.

    Hope someone can point me in the right direction.

    Thanks,

    Mak


    Ossian
    Moderator
    #191863

    You could do it with WMI queries in PowerShell, but as an alternative, consider using PerfMon alerts, which can either run a script or (IIRC) send an email.
    This should get you started: https://support.microsoft.com/en-gb/help/2424491/how-to-create-performance-counter-alert-and-send-email-when-the-alert


    dadosh
    Member
    #390461

    Thanks Ossian!!!

    Will try the link you sent.

    Thanks again.

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.