Tag Archives: time

PowerShell: Email on high CPU usage

Another quickie. The requirement was to get an email alert when CPU usage reached over 90%. This is achievable via PerfMon Data Collector Set alerts, EventLog task triggers and a script to send an email (unless you’re on pre-Server 2012 … Continue reading

Rate this:

Posted in Performance, PowerShell | Tagged , , , , , , , , , , , , | Leave a comment

PowerShell function to convert WMI Event Log date and time to datetime data type

PowerShell likes to hold dates and times as the DateTime data type. This enables you to do useful things with it such as maths, easily pick out bits of it (e.g. just the date ignoring the time, just the hour, … Continue reading

Rate this:

Posted in PowerShell | Tagged , , , , , , , , , | Leave a comment

PowerShell: Get downtime between a range of dates/times

This is an enhancement of my previous script which found the duration of the most recent downtime of a Windows machine. As with that script, by “downtime” I mean the time between the machine shutting down (cleanly or unexpectedly) and … Continue reading

Rate this:

Posted in PowerShell, Windows | Tagged , , , , , , , , , , , | 1 Comment

PowerShell: Get downtime between shutdown and startup

I have a requirement to provide the amount of time that servers are unavailable for, and the way I have been asked to calculate this is to measure time between when a server shuts down and when it has started … Continue reading

Rate this:

Posted in PowerShell, Windows | Tagged , , , , , , , , , , , , | 6 Comments

PowerShell LDAP response time monitor

I recently had some issues with a system not getting very response times to LDAP queries sent to various Active Directory domain controllers. These were resolved via a combination of Windows Server 2003 Server Performance Advisor and the built in, … Continue reading

Rate this:

Posted in Performance, PowerShell, Windows | Tagged , , , , , , , , , , , , , | 3 Comments