Exploring ConfigMgr Health Script Results

by | Feb 14, 2024 | ConfigMgr, How-To

A while back I should you how to setup and configure ConfigMgr Health Script. I always indented to show you the ConfigMgr Health Script. This blog will walk you thru the results and will show you some ideas on how to create your own ConfigMgr Health Dashboard.

Background

You really only need to setup and run ConfigMgr Client Health – Anders Rødland Startup Script. Although there are two modes to run the script this blog does assume that you setup the database / API portion. Then to truly make it useful you need to also deploy it a GPO startup Script. Which I document How to Create a Computer Start Up GPO

Exploring ConfigMgr Health Script Results

The database is comprised of two tables Clients and Configuration. To be honest, there is nothing exciting in the Configuration table. However, in the Client table this is where you want to look for all details returned via the script.

ConfigMGr Health Script Results Columns

Below is the list of columns and what they are represent.

Column Name

Notes

Hostname

This is the computer name

OperatingSystem

Operating System (OS) of the device.

Architecture

Is it x86 or x64 or ARM

Build

The OS Build number

Manufacturer

Hardware Manufacturer

Model

Hardware Model

InstallDate

OS install Date

OSUpdates

Last OS Update Date

LastLoggedOnUser

Who was last logon

ClientVersion

ConfigMgr Client Version

PSVersion

PowerShell Version

PSBuild

PowerShell Build version

Sitecode

ConfigMgr Site Code

Domain

AD Domain

MaxLogSize

ConfigMgr Log Size

MaxLogHistory

Number of ConfigMgr Log to retain

CacheSize

ConfigMgr cache size

ClientCertificate

What is the Status of ConfigMgr client certificate?

ProvisioningMode

Is the device in Provisioning Mode?

DNS

Is DNS healthy?

Drivers

Are Drivers Installed?

Updates

Validating required updates is installed on the client.

PendingReboot

Is the Device pending a Reboot?

LastBootTime

When did the device last Reboot?

OSDiskFreeSpace

How much free space is one C:\?

Services

Is ConfigMgr services running?

AdminShare

Are the windows admin shares enabled?

StateMessages

Is State Message Healthy

WUAHandler

Is WUA Healthy

WMI

Is WMI Healthy

RefreshComplianceState

When was the last refresh Compliance state?

ClientInstalled

Is the ConfigMgr Client Installed?

Version

The version of the ConfigMgr Health Script run

Timestamp

When did the ConfigMgr Health Script Run

HWInventory

What was the last Hardware Inventory?

SWMetering

Is Software Metering Healthy?

BITS

Is BITS healthy?

PatchLevel

What is the OD Patch level?

ClientInstalledReason

Did the ConfigMgr health script trigger the install of ConfigMgr agent?

ConfigMgr Reporting Point

If your client health db is on the same server as you ConfigMgr. You can use three-part names to query client health db from your ConfigMgr Database. I demonstrate this within the video.

If your client health db if remote to ConfigMgr db, then you can use Linked server and four-part names. To create a linked server, see my post Cloud Reporting: How to Setup a Linked Server

For more details on three or four-part names see my post What are the Four-Part Names of a SQL Server Object?

Samples Queries

Below are just a couple of query that you can use within your own dashboard for Client Health.

You can also download the SQL files instead of copy paste. https://askgarth.com/wp-content/uploads/2024/01/ComputerHealth.zip

List all Devices within ConfigMgr that are not within Client Health db.

Select R.Name0 From v_R_System R
Where R.Name0 not in (Select C.Hostname from ClientHealth.dbo.Clients C)

List all Devices within Client Health db that are not within ConfigMgr

Select C.Hostname from ClientHealth.dbo.Clients C
Where C.Hostname not in (Select R.Name0 From v_R_System R)

Count of Client Install Reason

Select isnull(C.ClientInstalledReason,'Good no install needed') as 'Instal Reason', Count(*) as 'Total'  from ClientHealth.dbo.Clients C group by C.ClientInstalledReason

Exploring ConfigMgr Health Script Results

In this video, I explore the ConfigMgr Health Script Results via its database.

Finally, don’t forget that you can subscribe to my RRS feed and my YouTube channel to stay on top of the latest tips and tricks.. Additionally, if you have any questions, please feel free to touch base @Garthmj.