Powershell Tip #7: Convert WMI date to Datetime

By | July 10, 2015

Tip: You can convert WMI date (format DTMF Distributed Management Task Force) to DateTime:


Note: Use CIM cmdlets (available since PowerShell v3) instead of WMI cmdlets, moreover CIM return a more understandable datetime format :
(Get-CimInstance -ClassName Win32_OperatingSystem).InstallDate

ManagementDateTimeConverter.ToDateTime Method


Leave a Reply

Your email address will not be published. Required fields are marked *