SCCM Documentation Script – Video Review of Automation

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.

3 thoughts on “SCCM Documentation Script – Video Review of Automation”

  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).

    Reply

Leave a Comment