Powershell: Format WMI timestap to normal DateTime

WMI does store timestamp in CIM_DATETIME format. To convert it to a more readable format there is a .Net management Class to help us out.

$WmiTimeStamp = '20210319114909.133270-000'
[System.Management.ManagementDateTimeConverter]::ToDateTime($WmiTimeStamp)

Leave a Reply

Your email address will not be published.