Last Boot Up Time - Script
The Script below give me the last boot up time of a server: strComputer = "."' Local computerSET objWMIDateTime = CREATEOBJECT("WbemScripting.SWbemDateTime") SET objWMI = GETOBJECT("winmgmts:\\" & strComputer & "\root\cimv2") SET colOS = objWMI.InstancesOf("Win32_OperatingSystem") FOR EACH objOS in colOS objWMIDateTime.Value = objOS.LastBootUpTime Wscript.Echo "Last Boot Up Time: " & objWMIDateTime.GetVarDateNEXT The result of the script is something like this: Last Boot Up Time: 04/26/2012 10:25:08 How I can get only the minutes of the variable?
April 26th, 2012 2:24pm

Hello, For scripting questions, ask them here: http://social.technet.microsoft.com/Forums/en-US/category/scripting This posting is provided "AS IS" with no warranties or guarantees , and confers no rights. Microsoft Student Partner 2010 / 2011 Microsoft Certified Professional Microsoft Certified Systems Administrator: Security Microsoft Certified Systems Engineer: Security Microsoft Certified Technology Specialist: Windows Server 2008 Active Directory, Configuration Microsoft Certified Technology Specialist: Windows Server 2008 Network Infrastructure, Configuration Microsoft Certified Technology Specialist: Windows Server 2008 Applications Infrastructure, Configuration Microsoft Certified Technology Specialist: Windows 7, Configuring Microsoft Certified Technology Specialist: Designing and Providing Volume Licensing Solutions to Large Organizations Microsoft Certified IT Professional: Enterprise Administrator Microsoft Certified IT Professional: Server Administrator Microsoft Certified Trainer
Free Windows Admin Tool Kit Click here and download it now
April 26th, 2012 2:31pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics