<pre><pre lang="vb"> <pre>Set dtmConvertedDate = CreateObject("WbemScripting.SWbemDateTime") strComputer = "DESKTOP-2ACDFQ" Set objWMIService = GetObject("winmgmts:" _ & "{impersonationLevel=Impersonate," _ & "authenticationLevel=Pkt}!\\" _ & strComputer & "\root\cimv2") Set colOperatingSystems = objWMIService.ExecQuery _ ("Select * from Win32_OperatingSystem") For Each objOS in colOperatingSystems dtmConvertedDate.Value = objOS.LastBootUpTime dtmLastBootUpTime = dtmConvertedDate.GetVarDate dtmSystemUptime = Now Wscript.Echo dtmSystemUptime Next
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)