SCCM Documentation Script – Video Review of Automation

2
SCCM Documentation Script

How to Document SCCM Settings every month? This post is a quick post to give a review of SCCM documentation script. David’s script helped many of us from disasters. I have shared one of my experience in the following section. I have explained that in one of my previous post here.

Content

My Experience - Importance of SCCM Documentation
Video Review of Paul Wetter's Updated Script
Enhancements of SCCM Documentation Tool
Examples - SCCM Documentation Script Command Lines
Download the SCCM Documentation Tool

My Experience – Importance of SCCM Documentation

What will happen when someone accidentally deletes all your SCCM CB boundaries and boundary groups? Your SCCM CB infrastructure is useless without boundaries and boundary groups. 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.

Video Review of Paul Wetter’s Updated Script

This video review will give you an overall idea about the script. How to run SCCM documentation script? What are the SCCM documentation script options available? etc… 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 of 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 :-

  *	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.  
  *	Collects 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

Following are sample command lines which can be used to run SCCM Documentation tool. Example – use cases or scenarios of 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 would recommend reading Paul’s post here before downloading the script from GitHub.

Here is the download link SCCM Documentation tool of from GitHub

SCCM Hierarchy Issues with Documentation

SCCM Documentation script helps to document your entire SCCM environment. If you have an SCCM CAS hierarchy, then you have to have proper access to all remote WMI servers. All primary, secondary site servers documentation is going to take 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 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

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

LEAVE A REPLY

Please enter your comment!
Please enter your name here

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