Your company's ad could live here and reach over 50,000 people a month!

Share This Post

Last Reboot Report

For full details see: http://social.technet.microsoft.com/Forums/en-US/configmgrreporting/thread/e0147d8a-8946-42bb-b6ed-a3c92bae5b23

 

select  distinct
  R.ResourceID, 
  R.Netbios_Name0 AS 'Computer Name', 
  OS.LastBootUpTime0 AS 'Last Boot Time', 
  R.Resource_Domain_OR_Workgr0 AS 'Domain/Workgroup', 
  S.SiteCode as 'SMS Site Code',
  adv.time,
  Datediff(dd,OS.LastBootUpTime0, adv.time)
from 
  dbo.v_R_System_Valid R
  inner join dbo.v_GS_OPERATING_SYSTEM OS on (OS.ResourceID = R.ResourceID) 
  inner join dbo.v_FullCollectionMembership FCM on (FCM.ResourceID = R.ResourceID)
  left  join dbo.v_Site S on (FCM.SiteCode = S.SiteCode) 
  join (select MachineName as 'Name', Max(Time) as 'Time' from  dbo.v_StatusMessage Where  MessageID = 10008 Group by MachineName) Adv on R.Netbios_Name0 = Adv.Name
Where 
  FCM.CollectionID = @CollectionID 
Order by 
  R.Netbios_Name0


Share This Post

Leave a Reply