ConfigMgr Client Health

ConfigMgr Client Health 0.6.0 Released

ConfigMgr Client Health finally supports logging to a SQL database. It automatically fixes Windows computers to ensure they can patch, and significantly increase patch compliance. Run SQL queries on the database to view the state of your clients.

Download: Microsoft Technet Galleries

The full and latest documentation is always available here

Log files is still used for now under the following conditions:

  • Computer fails to connect to the SQL database.
  • Driver error. The failed driver is listed in the log file for the specific computer.
  • DNS error. IP addresses from the DNS server and local computer is listed in the log file if the DNS server have an IP address registered for the computer that is not used by the computer.

So delete all log files for ConfigMgr Client Health before you install this version. Only those specific errors are logged to files, the rest is available in the SQL database.

And I’m happy to announce: I have started the work to create a Configuration Manager console extension to fully integrate ConfigMgr Client Health with the Configuration Manager console.

Some useful SQL queries for ConfigMgr Client Health

All computers, ordered by latest script execution time.

SELECT * FROM dbo.Clients ORDER BY Timestamp DESC


Computers with less than 10% free space on C:

SELECT Hostname, OperatingSystem, InstallDate, LastLoggedOnUser, OSDiskFreeSpace FROM dbo.Clients WHERE OSDiskFreeSpace <=10 ORDER BY OSDiskFreeSpace ASC

Computers with low or no free space on C: can be hard to patch and deploy software to, but I do not want the client health script to attempt any auto-cleaning of files. Running this SQL query on the Client Health database lists all computers with 10% or less free space on C:. This is a list we send to our service desk, and they will help the users to clean up, or reinstall the computers.


Computers not patched in the latest 60 days

SELECT Hostname, OperatingSystem, InstallDate, OSUpdates, LastLoggedOnUser FROM dbo.Clients WHERE OSUpdates <= DATEADD(DAY, -60, GETDATE())

Computers who have not patched in 60 days or more should be investigated. This query gives you that list. The easy solution is to just reinstall the computers. The goal of ConfigMgr Client Health is to find as many causes as possible to why a computer is not patching, and automatically try to fix them. Please let me know if you find a root cause and fix not detected by this script and I would love to add it.


Anders Rødland

Anders Rødland started his IT career in 2006. My main focus is MS Configuration Manager and client management, and I have passed 17 Microsoft certifications since then. My main expertise is on client management with Microsoft Endpoint Manager: Intune and Configuration Manager. I also do a lot of work on the security side with Microsoft Defender for Endpoint. In addition to my Microsoft certification, I also have an ITIL v3 Foundation certification. This is my private blog and do not represent my employer. I use this to share information that I find useful. Sharing is caring.

2 thoughts to “ConfigMgr Client Health 0.6.0 Released”

  1. Hello,
    SetAssignedSite works fine in 1610 according to our testing if using the com object instead of WMI.

    This code will do the trick:
    $sms = new-object –comobject “Microsoft.SMS.Client”

    1. Thank you. I tested with the WMI but it was very buggy, so for now the script was reinstalling the client if sitecode was wrong. I will implement this in the next version, and this will be much smoother.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.