Reports the Universal Time Coordinate (UTC) time on a computer.

This script was tested using Kixtart 2001 (412) for Microsoft Windows, available from Kixtart.org.

Kixtart
Edit|Remove
$strComputer = "."
$objWMIService = GetObject("winmgmts:\\"+ $strComputer + "\root\cimv2")
$colItems = $objWMIService.ExecQuery("Select * from Win32_UTCTime")
For Each $objItem in $colItems
    ? "Day:" + $objItem.Day
    ? "Day Of Week:" + $objItem.DayOfWeek
    ? "Hour:" + $objItem.Hour
    ? "Milliseconds:" + $objItem.Milliseconds
    ? "Minute:" + $objItem.Minute
    ? "Month:" + $objItem.Month
    ? "Quarter:" + $objItem.Quarter
    ? "Second:" + $objItem.Second
    ? "Week In Month:" + $objItem.WeekInMonth
    ? "Year:" + $objItem.Year
Next