ConfigMgr Client Health 0.8.0 – Introducing Webservice

I’m happy to release version 0.8.0 of ConfigMgr Client Health, and introduce a webservice to communicate with the database.

The script now supports updating the database through a RESTful API, which simplifies and secures communication with the database. Using the -Webservice parameter, the script sends the results to the webservice, which then updates the database. Computer accounts no longer requires write access to the database in order to update it.

The webservice is developed using .NET Core 2.0, and requires the Microsoft .NET Core 2.0 Runtime & Hosting bundle to be installed on the server. You can download that here: https://www.microsoft.com/net/download/thank-you/dotnet-runtime-2.0.9-windows-hosting-bundle-installer

Example executing script with webservice: .\ConfigMgrClientHealth.ps1 -Config .\config.xml -Webservice https://cm01.rodland.lab/ConfigMgrClientHealth

Download: Microsoft Technet Galleries

Documentation: ConfigMgr Client Health

Changes since version 0.7.6

  • Webservice to communicate with database
  • Windows 10 1803 and Windows 10 LTSB will now report build number correctly
  • Fixed remaining pieces of hard coded paths in the script
  • Fixed a bug that could case gpupdate to hang when initiated by Client Health
  • Fixed and enhanced the service tests (Thank you Bryan Dam)
  • Added a function to test if PolicyPlatform is okay in WMI. Error here will cause ccmsetup to fail.
  • Script will now validate if config.xml is valid XML, and abort if XML fails validation.

3 thoughts on “ConfigMgr Client Health 0.8.0 – Introducing Webservice”

  1. Francesco Bisgaard

    Hi Anders, thanks for this excellent tool.

    I’ve implemented the webservice endpoint and found that clients attempting the PUT method on an existing client record get an error 405 returned by the webservice:

    2019-12-04 02:40:05 x.x.x.x PUT /Clients/xxx – x – x.x.x.x Mozilla/5.0+(Windows+NT;+Windows+NT+10.0;+en-AU)+WindowsPowerShell/5.1.14393.3053 – 405 0 0 2

    When POST is used, the record is created just fine (HTTP response 201).

    below is my appsettings.json file

    {
    “ConnectionStrings”: {
    “SQLDatabase”: “Server=redactedfqdn\SQL1;Database=ClientHealth;Trusted_Connection=True;”,
    },
    “Logging”: {
    “IncludeScopes”: false,
    “Debug”: {
    “LogLevel”: {
    “Default”: “Warning”
    }
    },
    “Console”: {
    “LogLevel”: {
    “Default”: “Warning”
    }
    }
    }
    }

    Also, the script has no prerequisite checks for systems running powershell v2.0 which lack the “Convertto-Json” and “Invoke-RestMethod” cmdlets. I’ve worked around this by declaring functions that wrap .NET calls that achieve the same outputs in the main script.

    In an ideal world, you’d be updating WMF or not using Server 2008, but an ideal world also wouldn’t have a need for this script…

    Thanks,

    Francesco

Leave a Comment

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

Scroll to Top