Preventative SCCM Monitor and Troubleshoot Website

As a SCCM admin, you might have to check SCCM health on a regular basis, and troubleshoot lots of client issues. Normally I have to UNC into the client machine, goes into C:\Windows\CCM\Logs, and then open my CMTrace to check the log. I am a bit tired of this, thus I use PowerShell Universal to build an interactive website to show the results.

This system will show:

  • Overall SCCM component status with detail logs
  • All SCCM server storage status
  • Interactive online SCCM client log viewer
  • Online diskspace check on demand
  • Patching result report
  • SCCM client cleanup list

To get this interactive SCCM monitor & troubleshoot system running, first you need to install PowerShell Universal on your system.

Then you create a dashboard to show all the pages. Here is my main page code:

# SCCM Monitor & Troubleshoot Website
# Rui Qiu
# 9/3/2021

$UDScriptRoot = "E:\Web"

$Theme = @{
    palette = @{
        primary = @{
            main = '#c3073f'
        #background = @{
        #   default = '#4e4e50'
    typography = @{
        fontFamily = 'monospace'
        fontSize = 13

$Pages = @()
$Pages += New-UDPage -Name 'SCCM Status' -Content {
    . "$UDScriptRoot\components.ps1"
#} -NavigationLayout permanent
} -NavigationLayout permanent

$Pages += New-UDPage -Name 'SCCM Storage' -Content {
    . "$UDScriptRoot\storage.ps1"
} -NavigationLayout permanent

$Pages += New-UDPage -Name 'Server Log' -Content {
    . "$UDScriptRoot\systemstatus.ps1"
} -NavigationLayout permanent

$Pages += New-UDPage -Name 'Client Log' -Content {
    . "$UDScriptRoot\logviewer.ps1"
} -NavigationLayout permanent

$Pages += New-UDPage -Name 'Scheduled Task Log' -Content {
    . "$UDScriptRoot\tasklog.ps1"
} -NavigationLayout permanent

$Pages += New-UDPage -Name 'Scheduled Clients Cleanup' -Content {
    . "$UDScriptRoot\cleanup.ps1"
} -NavigationLayout permanent

$Pages += New-UDPage -Name 'Disk Space Checker' -Content {
    . "$UDScriptRoot\diskspace.ps1"
} -NavigationLayout permanent

$Pages += New-UDPage -Name 'Patching Machine List' -Content {
    . "$UDScriptRoot\patchinglist.ps1"
} -NavigationLayout permanent

$Pages += New-UDPage -Name 'Patching Report' -Content {
    . "$UDScriptRoot\patching.ps1"
} -NavigationLayout permanent

New-UDDashboard -Theme $Theme -Title 'SCCM Monitor & Troubleshoot' -Pages $Pages

For each detailed page, please refer to these articles:

Here are the references I use when I build this system:

Use IIS to setup website with windows authentication

SQL query to get sccm component status

PowerShell HTML Formatting

Free Diskspace in Chart/Graph

Extract status message

Run Powershell from Webpage via ASP.NET

Leave a Comment