Skip to content
SCCM Documentation Script – Video Review of Automation

SCCM Documentation Script – Video Review of Automation

Written By Anoop C Nair
Last Updated August 12, 2024
Posted In SCCM
SHARE

How do I document SCCM Settings every month? This is a quick post to review the SCCM documentation script. David’s script saved many of us from disasters.

I have shared one of my experiences in the following section, which I explained in one of my previous posts here.

What will happen when someone accidentally deletes all your SCCM CB boundaries and boundary groups? Your SCCM CB infrastructure is useless without them. One of my colleagues had SCCM environment documentation, which he took with the help of David O’Brien’s script.

The SCCM documentation helped us to start the recovery process of SCCM boundaries and boundary groups.

Patch My PC

Video Review of Paul Wetter’s Updated Script

This video review will give you an overall idea about the script. How to run the SCCM documentation script? What SCCM documentation script options are available? How to take the documentation of your SCCM settings automatically?

Enhancements of SCCM Documentation Script

As per Paul’s blog here, there are 17 enhancements. My favorite improvement is that he removed the dependency on Microsoft Word. David’s script had a prerequisite to have a word installed on the server or machine where you run the script. Paul’s enhancement to the script removed this dependency!

New Features

The following are the features of SCCM Documentation Script

  • Removed dependence on Microsoft Word.
  • Formatted HTML output.
  • Updated to work with Current Branch (1710+).
  • Collects everything for Software Updates (ADRS, Config, Packages, Groups)!!
  • Collects important Info for SQL database.
  • Collect site features and servicing history.
  • Collect Default Boundary Group settings.
  • Extended to include configuration of all the new Client Settings.
  • Collects additional Collection information.
  • Summarizes Collections with maintenance windows.
  • Summary of all the different Compliance settings (Conditional Access, Company resources, etc).
  • Updated Endpoint Protection Profile info.
  • MUCH more detail on Applications.
  • Added OSD Related Items (Installers, Images, Upgrade Packages)
  • Lists Task Sequence steps.
  • Summary or detailed options.
  • SCCM Scripts

Examples – SCCM Documentation Script Command Lines

The following are sample command lines that can run the SCCM Documentation tool. Example – use cases or scenarios of the SCCM Documentation tool.

### EXAMPLE 1
This will document everything with just the summary information of each component:
DocumentCMCB.ps1
### EXAMPLE 2

This will document everything with detailed information. Will make a very large file!
DocumentCMCB.ps1 -ListAllInformation
### EXAMPLE 3

This will document everything with detailed information. It will also embed a custom logo from the provided URL into the cover page.
DocumentCMCB.ps1 -CompanyLogo 'http://www.contoso.com/logo.jpg' -ListAllInformation
### EXAMPLE 4
This will document everything with summary information, a custom logo, and a custom Author and Vendor.
DocumentCMCB.ps1 -CompanyLogo 'http://www.contoso.com/logo.jpg' -Author "Bugs Bunny" -Vendor "Acme"

Download the SCCM Documentation Script

I recommend reading Paul’s post before downloading the script from GitHub.

Here is the download link SCCM Documentation tool from GitHub

SCCM Hierarchy Issues with Documentation

The SCCM Documentation script helps document your entire SCCM environment. If you have an SCCM CAS hierarchy, then you have to have proper access to all remote WMI servers. Documenting all primary and secondary site servers will take a long time, depending on the network connectivity.

SCCM Documentation Connectivity Requirement

I have a blog post about Microsoft SCCM RAP engagement to check the health of your SCCM environment. I think, for the SCCM documentation script, you need the following ports to be open between CAS, Primary,  Secondary, and remote site systems in your environment. https://www.anoopcnair.com/sccm-ms-rap-real-world-tips-pros/

  • Port + Protocol Notes
  • TCP 135 RPC Endpoint Mapper
  • TCP 1024—65535 Dynamic Ports used by RPC/DCOM/WMI
  • TCP 139 NetBIOS session service /SMB
  • TCP 445 SMB over sockets/TCP
  • TCP 1433 Default SQL Instance Port (if you have a custom port, please make a rule for it)
  • UDP 137 NetBIOS name service
  • UDP 138 NetBIOS
  • UDP 1434 SQL Browser

We are on WhatsApp. To get the latest step-by-step guides and news updates, Join our Channel. Click here –HTMD WhatsApp.

Author

Anoop C Nair is Microsoft MVP! He is a Device Management Admin with more than 20 years of experience (calculation done in 2021) in IT. He is a Blogger, Speaker, and Local User Group HTMD Community leader. His primary focus is Device Management technologies like SCCM 2012, Current Branch, and Intune. He writes about ConfigMgr, Windows 11, Windows 10, Azure AD, Microsoft Intune, Windows 365, AVD, etc.

Written by

Anoop C Nair is Workplace Technology solution architect with 25+ years of experience in global enterprise organizations such as JP Morgan, Capgemini, etc. Microsoft Certified Trainer. Microsoft MVP from 2015 onwards for consecutive 11+ years! He also conducts Intune and modern workplace tech training for enterprise organizations. He is Blogger, Speaker, and Founder of HTMD Community and HTMD Conference. His main focus is on Device Management technologies like Intune, Windows, Cloud PC. He writes about technologies like Intune, SCCM, Windows, Cloud PC, Windows, Entra, Microsoft Security.

Discussion · 3 comments

  1. Hi Anoop,
    Thanks for the script, i wanted this done long ago so i have things documented and came across this. I am getting following errors while running it, errors are related only to our secondary site servers. here is the details for the errors i am getting…Need help.
    Thank you…
    PS D:\Temp\SCCM Documentation Script> DocumentCMCB.ps1 -CompanyLogo ‘D:\Temp\SCCM Documentation Script\HSSOBlackTranspar
    ency.png’ -Author “SCCM Administrators” -Vendor “Microsoft” -ListAllInformation
    DocumentCMCB.ps1 : The term ‘DocumentCMCB.ps1’ is not recognized as the name of a cmdlet, function, script file, or
    operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try
    again.
    At line:1 char:1
    + DocumentCMCB.ps1 -CompanyLogo ‘D:\Temp\SCCM Documentation Script\HSSO …
    + ~~~~~~~~~~~~~~~~
    + CategoryInfo : ObjectNotFound: (DocumentCMCB.ps1:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

    Suggestion [3,General]: The command DocumentCMCB.ps1 was not found, but does exist in the current location. Windows Powe
    rShell does not load commands from the current location by default. If you trust this command, instead type: “.\Document
    CMCB.ps1”. See “get-help about_Command_Precedence” for more details.
    PS D:\Temp\SCCM Documentation Script> .\DocumentCMCB.ps1 -CompanyLogo ‘D:\Temp\SCCM Documentation Script\HSSOBlackTransp
    arency.png’ -Author “SCCM Administrators” -Vendor “Microsoft” -ListAllInformation

    cmdlet DocumentCMCB.ps1 at command pipeline position 1
    Supply values for the following parameters:
    CompanyName: HSSOntario
    Beginning Execution of version 3.42 at: 3:55 PM
    Outputting documentation to: D:\Temp\SCCM Documentation Script\CMDocumentation.html
    Get-WmiObject : Invalid namespace “root\sms\site_020”
    At D:\Temp\SCCM Documentation Script\DocumentCMCB.ps1:2376 char:13
    + $CMSUPs = Get-WmiObject -Class sms_sci_sysresuse -Namespace root\sm …
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : InvalidArgument: (:) [Get-WmiObject], ManagementException
    + FullyQualifiedErrorId : GetWMIManagementException,Microsoft.PowerShell.Commands.GetWmiObjectCommand

    Get-WmiObject : Invalid namespace “ROOT\SMS\site_020”
    At D:\Temp\SCCM Documentation Script\DocumentCMCB.ps1:2415 char:17
    + … $CPProps = (Get-WmiObject -Namespace ROOT\SMS\site_$($CMSite.SiteCode …
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : InvalidArgument: (:) [Get-WmiObject], ManagementException
    + FullyQualifiedErrorId : GetWMIManagementException,Microsoft.PowerShell.Commands.GetWmiObjectCommand

    Get-WmiObject : Invalid namespace “root\sms\site_110”
    At D:\Temp\SCCM Documentation Script\DocumentCMCB.ps1:2376 char:13
    + $CMSUPs = Get-WmiObject -Class sms_sci_sysresuse -Namespace root\sm …
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : InvalidArgument: (:) [Get-WmiObject], ManagementException
    + FullyQualifiedErrorId : GetWMIManagementException,Microsoft.PowerShell.Commands.GetWmiObjectCommand

    Get-WmiObject : Invalid namespace “ROOT\SMS\site_110”
    At D:\Temp\SCCM Documentation Script\DocumentCMCB.ps1:2415 char:17
    + … $CPProps = (Get-WmiObject -Namespace ROOT\SMS\site_$($CMSite.SiteCode …
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : InvalidArgument: (:) [Get-WmiObject], ManagementException
    + FullyQualifiedErrorId : GetWMIManagementException,Microsoft.PowerShell.Commands.GetWmiObjectCommand

    Get-WmiObject : Invalid namespace “root\sms\site_120”
    At D:\Temp\SCCM Documentation Script\DocumentCMCB.ps1:2376 char:13
    + $CMSUPs = Get-WmiObject -Class sms_sci_sysresuse -Namespace root\sm …
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : InvalidArgument: (:) [Get-WmiObject], ManagementException
    + FullyQualifiedErrorId : GetWMIManagementException,Microsoft.PowerShell.Commands.GetWmiObjectCommand

    Get-WmiObject : Invalid namespace “ROOT\SMS\site_120”
    At D:\Temp\SCCM Documentation Script\DocumentCMCB.ps1:2415 char:17
    + … $CPProps = (Get-WmiObject -Namespace ROOT\SMS\site_$($CMSite.SiteCode …
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : InvalidArgument: (:) [Get-WmiObject], ManagementException
    + FullyQualifiedErrorId : GetWMIManagementException,Microsoft.PowerShell.Commands.GetWmiObjectCommand

    Completed execution at: 4:26 PM.
    Total execution time: 30 minute(s), and 51 second(s).

Join the discussion

Your email address will not be published. Required fields are marked *

Related guides

Intune

Windows 11 KB5101650 KB5099414 July 2026 Patch and 3 Zero Day Vulnerabilities and 570 Flaws

Key Takeaways Windows 11 KB5101650 KB5099414 July 2026 Patch and 3 Zero Day Vulnerabilities and 570 Flaws! In the July 2026 Patch, Microsoft introduced new features designed to improve the overall Windows experience. The update adds enhancements to Windows Update for more flexible update management and introduces Point-in-Time Restore, providing an additional recovery option for […]

AC Anoop C Nair 9 min read
Intune

2026 June KB5094126 KB5093998 Windows 11 Patch | 3 Zero Day Vulnerabilities and 200 Flaws

Key Takeaways 2026 June KB5094126 KB5093998 Windows 11 Patch | 3 Zero Day Vulnerabilities and 200 Flaws! The June 2026 Windows 11 Patch Tuesday update brings several improvements to File Explorer. It adds support for additional archive formats, including UU, CPIO, XAR, and NuGet Packages (NUPKG). The update also preserves View and Sort preferences in […]

AC Anoop C Nair 10 min read
Intune

2026 May KB5089549 KB5087420 Windows 11 Patch | 0 Zero Day Vulnerabilities and 120 Flaws

Key Takeaways The Windows 11 May 2026 Patch KB5089549 KB5087420 Update brings important security fixes, performance improvements, and reliability enhancements across the operating system. The update introduces new features such as Xbox Mode for gaming, File Explorer improvements, enhanced input and sharing experiences, better taskbar and Windows Hello reliability, and additional enterprise management capabilities for […]

AC Anoop C Nair 8 min read
SCCM

ConfigMgr 2603 Introduces New Early Update Enrollment Process

Key Takeaways In this post we are discussing the ConfigMgr 2603 Introduces New Early Update Enrollment Process. Microsoft has officially released Configuration Manager version 2603 to the Early Update Ring, giving organizations an opportunity to test upcoming improvements before the global production rollout. The release is targeted at enterprises running ConfigMgr version 2409 or later […]

AC Anoop C Nair 3 min read