Client Management Suite

 View Only
  • 1.  Computer Reboot Events

    Posted Sep 21, 2015 02:51 PM

    I have seen a post on this and was not clear on the solution(https://www-secure.symantec.com/connect/forums/machine-last-reboot-time)

    What I am looking for is to get the last time a computer has rebooted, I have looked at the EVT_Reboot that is associated with Patch Management and the Reboot History table which also seems ot only show reboots that are associated with Patch Management. What I am looking for is the actual last time the computer rebooted. Has anyone accomplished this? The URL to the article above is not clear to me and why should I have to run a script to get that into the database. We are on 7.5 SP1 HF5.



  • 2.  RE: Computer Reboot Events

    Trusted Advisor
    Posted Sep 22, 2015 11:03 AM

    This little report will give you the computer's name, it's OS, and the last reboot date/time.  To the best of my knowledge Evt_Reboot still collects data even if the machine is rebooted by non-Patch means.

     

    SELECT DISTINCT
      T1.[Name] AS 'Name',
      T1.[OS Name] AS 'OS Name',
      LastDate.[maxtime] AS 'Last Reboot',
      T1.[_ResourceGuid]

    FROM (Select DISTINCT T0.[_ResourceGuid] as 'Guid',MAX(T0.[_eventTime])as 'maxtime' From [Evt_Reboot] T0
    Group By T0.[_resourceguid])AS "LastDate"
    INNER JOIN [Inv_AeX_AC_Identification] T1 ON LastDate.[Guid] = T1.[_ResourceGuid]

     



  • 3.  RE: Computer Reboot Events

    Posted Sep 22, 2015 02:07 PM

    HighTower thank you for the reply. I ran the report and then looked up my machine and it shows my last reboot time as being 9/14/2015 and I know I rebooted this morning. 9/14 was the last time updates installed on my machine and I rebooted due to updates being installed. I do agree though that the reboot events have to be kept somewhere and if not part of a current capture event it could be added thru a dataclass or something. I will keep searching unless there is another suggestion.



  • 4.  RE: Computer Reboot Events

    Trusted Advisor
    Posted Sep 22, 2015 02:10 PM

    It might be a reporting interval question in that case.  I'm not sure but that data might come back with the Basic Inventory gathering.  If you go into your Symantec Management Agent > Settings > and then Send the Basic Inventory does that fix your report?



  • 5.  RE: Computer Reboot Events
    Best Answer

    Broadcom Employee
    Posted Sep 22, 2015 03:42 PM

    1. Maybe you can accomplish this, using report to see last user logoff/logon time on managed client PC?

    2. There is a view "vRebootHistory" but it contains data only from Servers where Inventory Agent and Server Inventory Pack are installed.

    3. If you want to know exact client PC reboot date, then you can create client script task (with enabled 'save task output' option) to get it via powershell or cmd script

    Cmd example:

    systeminfo | find /i "Boot Time"

    PowerShell:

    Get-WmiObject -class Win32_OperatingSystem | Select-Object  __SERVER,@{label='LastBootUpTime';expression={$_.ConvertToDateTime($_.LastBootUpTime)}}

    After task execution, every record will be populated in "TaskOutputPropertyValue" sql table for every new TaskInstance(s). Create custom SQL report to get appropriate data from this SQL table or use existing "tmSelectTaskOutputProperties" stored procedure and specify there appropriate Task Instance guid to get task output.



  • 6.  RE: Computer Reboot Events

    Posted Sep 24, 2015 10:57 AM

    Igor, thanks for the suggestion. I have created a task and ran it against my machine as a test and cannot find a reboot of any type in TaskOutputPropertyValue. I am not fimiliar with stored procedures so I am not sure how to get the information out of tmSelectTaskOutputProperties.



  • 7.  RE: Computer Reboot Events

    Posted Sep 24, 2015 04:12 PM

    Ok I am not much of a scripter but had to buckle down and get to what I needed to get the job done. I borrowed from Igor (Thank You Igor) and Googled a lot today. This is what I came up with... in short. I just have to get the rest which I will.

     $Today = Get-Date

    $Boot = (Get-CimInstance Win32_operatingSystem).lastbootuptime

    If ($Today.Year -eq $Boot.Year -And $Today.Month -eq $Boot.Month -And $Today.Day -eq $Boot.Day)

    {

     'Install Some Application'

    }

    Else

    {

     'You Should Exit Here'

    }