DMTF / .NET DateTime Conversion

Topics: Developer Forum
Coordinator
Jun 27, 2007 at 3:18 PM
We have these scripts that convert:

Connect-VirtualServer (vmadmin)
Invokes URL to Virtual Server's VSWebApp.exe.

ConvertFrom-WmiDateTime
Uses the PowerShell ManagementDateTimeConverter to converter between WMI
and .NET DateTime. This is a pipeline oriented script.

Usage:
gwmi win32_operatingsystem | gpv LastBootUpTime | ConvertFrom-WmiDateTime

ConvertFrom-WmiTimeSpan
Uses the PowerShell ManagementDateTimeConverter to converter between WMI
and .NET TimeSpan. This is a pipeline oriented script.

ConvertTo-DmtfDateTime
Uses the PowerShell ManagementDateTimeConverter to converter between DMTF
and .NET DateTime.

ConvertTo-DmtfTimeInterval
Uses the PowerShell ManagementDateTimeConverter to converter between DMTF
and .NET TimeSpan.

but I think there are also some type converters to do some of this automatically. Do we still need these functions? Anybody know?