Server up time and Last Inventory Report – Customized Using SCCM 2012.


Image

Well !! Most of us are worried about whether our server had a sudden reboot !! Though there are many tools that can be used to Monitor the same , however if in case you do not have any of these tools then the same can be monitored using the below script :

 

SELECT

os.Caption0 as ‘Server Type’,

cs.Name0 as ‘Server Name’,

DateDiff(hour,os.LastBootUpTime0,ws.LastHWScan) as ‘Uptime (in Hours)’,

os.LastBootUpTime0 as ‘Last Reboot Date’,

ws.LastHWScan as ‘Last Hardware Inventory’

FROM v_GS_COMPUTER_SYSTEM cs

INNER JOIN v_GS_Operating_System os

ON cs.ResourceID = os.ResourceID

LEFT OUTER JOIN v_GS_WORKSTATION_STATUS ws

ON ws.ResourceID = os.ResourceID

WHERE os.Caption0 LIKE ‘%server%’

AND ws.LastHWScan <> 0 AND cs.Name0 IS NOT NULL

 

Home Page , , ,

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

<span>%d</span> bloggers like this: