SQL Query
You just have to join v_FullCollectionMembership.Torsten Meringer | http://www.mssccmfaq.de
February 9th, 2012 10:47am

hi all, please provide me the SQL Query for the following attributes. Computer Name, LastLogonTime, LastBootTime, Last Scan Time. Thanks & Regards, sree.....Thanks & Regards, sree.............
Free Windows Admin Tool Kit Click here and download it now
February 25th, 2012 1:43pm

I'm not sure about last logged in time. Everything else you want is here: declare @LastDate datetime set @LastDate = DATEADD(dd,-convert(int,3),GetDate()) Select cs.Name0 as "Computer Name", DateDiff(hour,os.LastBootUpTime0,ws.LastHWScan) as "Uptime (in Hours)", os.LastBootUpTime0 as "Last Reboot Date/Time", ws.LastHWScan as "Last Hardware Inventory" From dbo.v_GS_WORKSTATION_STATUS ws Left Outer Join dbo.v_GS_Operating_System os on ws.ResourceID = os.ResourceID left outer join dbo.v_GS_COMPUTER_SYSTEM cs on cs.ResourceID = os.ResourceID left outer join dbo.v_GS_SYSTEM sys on sys.ResourceID = os.ResourceID Where Sys.SystemRole0 !='Server'and ws.LastHWScan > @LastDate Order by 2 DESC, Cs.Name0John Marcum | http://myitforum.com/cs2/blogs/jmarcum/|
February 25th, 2012 3:08pm

You can find the information in System resource, computer system and operating systemKent Agerlund | My blogs: blog.coretech.dk/kea and SCUG.dk/ | Twitter: @Agerlund | Linkedin: Kent Agerlund
Free Windows Admin Tool Kit Click here and download it now
February 25th, 2012 3:12pm

Thanks a lot marcum john, report is working fine .. :) can i limit this report to a collection? could you please share that query for me... regards, sreeThanks & Regards, sree.............
February 26th, 2012 2:06am

You just have to join v_FullCollectionMembership.Torsten Meringer | http://www.mssccmfaq.de
Free Windows Admin Tool Kit Click here and download it now
February 26th, 2012 2:56am

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

Other recent topics Other recent topics