• SCOM 2012 Documentation
  • Microsoft OpsMgr Team Blog
  • Kevin Holman’s Blog
  • thoughtsonopsmgr
  • SCOM2K7 Blog
  • BICTT Blog
  • Cameron Fuller
  • JC’s SCOM Blog
  • Tao Yang SCOM Blog
SCOM GOD

SCCM Query: Uptime and Last Reboot Time

October 17, 2013 2:44 pm / Leave a Comment / SCOMGod

SELECT
cs.Name0 AS ‘ComputerName’,
DATEDIFF(HOUR, os.LastBootUpTime0, ws.LastHWScan)
AS ‘Uptime (in Hours)’,
CONVERT(VARCHAR(26), os.LastBootUpTime0, 100)
AS ‘Last Reboot Date/Time’,
CONVERT(VARCHAR(26), ws.LastHWScan, 101)
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
WHERE os.Caption0 LIKE ‘%server%’
ORDER BY os.LastBootUpTime0 ASC

 

CDAOPSSQL01 721 Sep 16 2013 10:42AM 10/16/2013
CDADECAPP02 722 Sep 16 2013 11:07AM 10/16/2013
CDADECSRCH01 722 Sep 16 2013 11:07AM 10/16/2013
CDAMSGTDI01 728 Sep 16 2013 11:07AM 10/16/2013
CDADECSRCH02 723 Sep 16 2013 11:07AM 10/16/2013
CDADEVDB01 720 Sep 16 2013 11:07AM 10/16/2013
CDADOMHUB01 725 Sep 16 2013 11:07AM 10/16/2013
CDADOMHUB02 727 Sep 16 2013 11:07AM 10/16/2013
CDADECAPP01 721 Sep 16 2013 11:07AM 10/16/2013
CDADECDB01 722 Sep 16 2013 11:07AM 10/16/2013
CDAMSGTDI02 726 Sep 16 2013 11:07AM 10/16/2013
CDADEVAPP01 720 Sep 16 2013 11:08AM 10/16/2013
CDASVCCRT01 720 Sep 16 2013 11:08AM 10/16/2013
CDAOPSMGR01 721 Sep 16 2013 11:16AM 10/16/2013
CDACFGMGR01 702 Sep 16 2013 12:53PM 10/15/2013
CDAEGAV01 701 Sep 16 2013  3:02PM 10/15/2013
CDAEXCHUB02 364 Oct  1 2013  2:24PM 10/16/2013
CDAEXCMBX02 315 Oct  3 2013  2:18PM 10/16/2013
CDAEXCMBX01 292 Oct  4 2013  3:16PM 10/16/2013
CDAEXCHUB01 149 Oct 10 2013  1:30PM 10/16/2013

Posted in: SCCM

Leave a Reply Cancel reply

You must be logged in to post a comment.

Post Navigation

← Previous Post
Next Post →

Recent Comments

  • admin on SCOM SQL Script to show gray agent data historical reasons
  • admin on SCOM SQL Script to show gray agent data historical reasons
  • Gene on SCOM SQL Script to show gray agent data historical reasons
  • admin on SCCM 2012 SP1 Installation Pre-reqs
  • Ryan on SCCM 2012 SP1 Installation Pre-reqs

Meta

  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org

Blogroll

  • Anders Blog
  • Daniele's Blog
  • Great SCOM Report Tutorial
  • Microsoft SCOM Forums
  • Savision Sample Dashboards
  • SCOM Blog
  • SCOM FAQ
  • scom-2012.blogspot.be
  • System Center 2012 Notes From the Field
  • Veam Install PDF

Recent Posts

  • PowerShell Script RDP Sessions List
  • Powershell Search Thru IIS Logs for Text String
  • PowerShell Reboot AD Based Computers
  • PowerShell Dump ACL of a Path Folder
  • SCOM Maintenance Mode Group of Servers
  • WMI Admin Access without Domain Admin Privilege
  • Script to Update User Redirected Folders ACL
  • Windows 2012 R2 Folder Redirection Step by Step
  • SharePoint 2013 Pre-reqs Link
  • Windows 2012 TSAdmin Download
  • Server Reboot Batch File
  • SCOM Get Missing Performance Data
  • SCOM 2012 Linux Agent gray and critical – Requires uninstall of agent & cert
  • SCOM 2012 Batch File to Clear Health Service Cache
  • SCOM 2012 Put URL into Maintenance Mode
  • MS Operations Management Suite Survival Guide
  • Script to Logoff All Disconnected Citrix Sessions
  • SCOM 2012 R2 Close All Alerts Script
  • SCOM Health Service Flush Scripts
  • SCOM 2012 PowerShell One Liners
  • GreenMachine for SCOM 2012
  • VBS Script to get AD Group Members
  • SCOM 2012 Maintenance Mode Notification MP
  • SCOM 2012 Reminder Alerts – PowerShell Script to Update Alert Resolution
  • SCOM 2012 R2 Test Event MP
  • SCOM Cluster Failover Events MP
  • SCOM 2012 R2 Maintenance Mode Powershell Script for Single Server
  • SCOM Reports Edit Issue QFE_MOMEsc_4724
  • Clean Windows 2008R2 Space
  • SCOM Linked Availability Report
  • SCOM Catch All Management Pack
  • PowerShell Script Close All SCOM Alerts 2007R2
  • Windows Update Error 80072EFE in Client Hyper-V Guest
  • SCOM query to get all data about an obejct
  • SCOM 2012 Cluster Disks management pack addendum
  • SCOM Cluster CSV Query
  • SCOM REPORT MODELS
  • SCOM 2012 Bulk URL Editor Manager Download
  • SCOM Catch All Error Events Log Rule
  • SCOM 2012 iSCSI Volume Shadow Copy Rules MP
  • Configuring Hyper-V for multiple subnets with only one NIC (Server 2012 R2 Edition)
  • Windows 2012 USB Boot Disk
  • SCOM Web Console Path Not Showing
  • Windows 2012 R2 BlueScreen Fix
  • AD Password Expiration Report Script
  • SCCM Query: Uptime and Last Reboot Time
  • SCOM 2012 ToolBox Downloads
  • EMC SCOM 2012 Management Pack ESI
  • SCOM ETL Trace Instructions
  • Extended SQL MP
  • SQL Instance List Report for SCOM
  • SCOM SQL Script to show gray agent data historical reasons
  • List of all SCOM Monitors from Various Popular Management Packs
  • How to extend date of SCOM certificate issued by Stand Alone CA
  • How to Run Hyper-V on a Laptop
  • SCOM Alert for Specific Account lockout
  • Microsoft Technet Lab Guides
  • SCOM Gateway Troubleshooting Steps – Jonathan Cowan Credit
  • SCOM 2012 Maintenance Mode Utility
  • How to Reinstall SCOM Reporting
  • SCCM 2012 Client Action Tool!
  • SCOM Report Data Source Fix
  • SCOM 2012 Health Check Script
  • SCOM RunAs Account Fixer PowerShell Script!
  • File Share Check and Email Script
  • SCOM 2012 Exchange 2010 MP Filling Logs with Login Failures
  • SCOM 2012 Report Data Source Option Missing
  • SCOM 2012 File Share Management Pack
  • Dynamic Groups with Expressions in OpsMgr
  • SCOM 2012 Unsealed Management Pack Backup
  • SCOM 2012 Web View Widget
  • Windows 2003 Bits 2.5 Download
  • SCOM 2012 Maintenance Mode
  • SCOM 2012 Utilization Reports Processor Data Missing
  • Windows Server 2012 Keyboard Shortcuts
  • SQL SCOM 2012 Alerts By Email Script
  • Windows 2012 Interface Explanation from Microsoft
  • Microsoft Private Cloud Step By Step
  • Managing SCOM 2012 Alerts: Daily Tasks
  • SCOM 2012 Training Guides and Videos
  • SCCM 2012 SP1 Installation Pre-reqs
  • SCOM SQL Run As Account Guidelines
  • Windows Server 2012 Won’t Activate: DNS Server Not Found
  • Brian Wren’s Sample Network Management Pack for System Center 2012 Operations Manager
  • The Greatest PowerShell Script of All Time for Windows Admins by Sean Duffy
  • SCOM Health Check Excel Template
  • List All AD User Object Attributes
  • Sharepoint 2010 Management Pack for SCOM 2012
  • How to Run a Powershell Script as a rule in SCOM as a Command
  • OpsLogix PING MP for SCOM 2012
  • SQL Server cannot authenticate using Kerberos because the Service Principal Name (SPN) is missing, misplaced, or duplicated.
  • SCOM Maintenance Mode EXE – Awesome Utility
  • SCOM Grey Agent MP from SCC
  • The All Management Servers Pool has not reported availability
  • SCOM ACS Filter Events
  • SCOM ACS Modified SQL Stored Procedures
  • MMS 2012 Session Listing Download
  • SQL Database Stuck in Restoring Mode
  • SCOM Maintenance Mode Script
  • SCOM Active Directory Security Management Pack
January 2021
M T W T F S S
« Apr    
 123
45678910
11121314151617
18192021222324
25262728293031

About

This site is a collection of tools and tips that I needed to place in the cloud. I have given credit where credit is due and respect all the hard work of those in the SCOM community that are miles above me in terms of knowledge, experience and accolades.
© Copyright 2021 - SCOM GOD
Infinity Theme by DesignCoral / WordPress