Tag Archives: date

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

Get VMware VM creation date (kind of)

VMware vSphere doesn’t seem to keep the VM creation date in its database anywhere, but if your VMs are all/mostly running Windows (and you have permission to do a WMI query against them) you can get the OS install date, … Continue reading

Rate this:

Posted in PowerShell, vSphere, Windows | Tagged , , , , , , , , , | 10 Comments