Win32_TimeZone vbscript sample code
The foundations for Manageability in Windows is Windows Management Instrumentation (WMI; formerly WBEM) and WMI extensions for Windows Driver Model (WDM).
ActiveXperts Network Monitor provides the ability to build monitor check routines based on WMI. ActiveXperts has collected more than a hundred WMI samples. You can use these samples as a base for new check routines you can write yourself. The Win32_TimeZone WMI class can be used in ActiveXperts Network Monitor to monitor your servers.
Description
The Win32_TimeZone WMI class represents the time zone information for a Windows system. This includes changes needed for the transition to and from daylight saving time.
Sample Code
On Error Resume Next strComputer = "." Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2") Set colItems = objWMIService.ExecQuery("Select * from Win32_TimeZone",,48) For Each objItem in colItems Wscript.Echo "Bias: " & objItem.Bias Wscript.Echo "Caption: " & objItem.Caption Wscript.Echo "DaylightBias: " & objItem.DaylightBias Wscript.Echo "DaylightDay: " & objItem.DaylightDay Wscript.Echo "DaylightDayOfWeek: " & objItem.DaylightDayOfWeek Wscript.Echo "DaylightHour: " & objItem.DaylightHour Wscript.Echo "DaylightMillisecond: " & objItem.DaylightMillisecond Wscript.Echo "DaylightMinute: " & objItem.DaylightMinute Wscript.Echo "DaylightMonth: " & objItem.DaylightMonth Wscript.Echo "DaylightName: " & objItem.DaylightName Wscript.Echo "DaylightSecond: " & objItem.DaylightSecond Wscript.Echo "DaylightYear: " & objItem.DaylightYear Wscript.Echo "Description: " & objItem.Description Wscript.Echo "SettingID: " & objItem.SettingID Wscript.Echo "StandardBias: " & objItem.StandardBias Wscript.Echo "StandardDay: " & objItem.StandardDay Wscript.Echo "StandardDayOfWeek: " & objItem.StandardDayOfWeek Wscript.Echo "StandardHour: " & objItem.StandardHour Wscript.Echo "StandardMillisecond: " & objItem.StandardMillisecond Wscript.Echo "StandardMinute: " & objItem.StandardMinute Wscript.Echo "StandardMonth: " & objItem.StandardMonth Wscript.Echo "StandardName: " & objItem.StandardName Wscript.Echo "StandardSecond: " & objItem.StandardSecond Wscript.Echo "StandardYear: " & objItem.StandardYear Next