powershell - WMI LastBootUpTime is not updated when server reboots -
i getting lastbootuptime of servers using powershell's cmdlet get-wmiobject.
[management.managementdatetimeconverter]::todatetime((get-wmiobject win32_operatingsystem -computername $server).lastbootuptime)
i have noticed servers (windows server 2003, 2008 r2 , 2012 r2) return lastbootuptime date in year 2014 (250+ days ago), while know sure servers have been rebooted couple of days ago within windows update cycle.
running following command on servers affected shows me correct last boot time.
net statistics server
it seems wmi property lastbootuptime not updated "anymore" when server restarts
what cause of flaw , there way fix this?
thanks in advance.
Comments
Post a Comment