paulwetter / documentconfigmgrcb Goto Github PK
View Code? Open in Web Editor NEWThis script attempts to document your entire Configuration Manager (MEMCM/SCCM) environment
Home Page: https://wetterssource.com/documentconfigmgrcb
This script attempts to document your entire Configuration Manager (MEMCM/SCCM) environment
Home Page: https://wetterssource.com/documentconfigmgrcb
The site discovery methods is showing "disabled" for all methods, even though all but network discovery are enabled.
I get an error message
Method invocation failed because [System.Management.ManagementObject] does not contain a method named 'Where'.
At C:\temp\DocumentConfigMgrCB-master\DocumentCMCB.ps1:1285 char:7
I don't document any of the discovery configuration.
At line 79, I added:
[parameter(Mandatory=$False)]
[string]$SMTPServer = "SMTP",
[parameter(Mandatory=$False)]
[string]$MailTo = "Richard Crews ",
[parameter(Mandatory=$False)]
[string]$MailFrom = "SCCM Monitor ",
[parameter(Mandatory=$False)]
[string]$SubjectLine = "SCCM Documentor",
[parameter(Mandatory=$False)]
[string]$CopyPath = "DocumentationFolderPath",
At the end I added:
Write-host "Beginning copy of $FilePath to $CopyPath"
Copy-Item $FilePath -Destination "$CopyPath" -Force
Write-host "Sending email."
Send-MailMessage -From $MailFrom -To $MailTo -Subject
A copy of the report has been saved to $CopyPath" -Attachments $FilePath -Priority High -SmtpServer $SmtpServer
I cannot thank you enough for this amazing script!
I am getting the following message during the script execution, which completes, and was curious if you knew what might cause it. I do not see anything weird in the output file.
Beginning Execution of version 3.42 at: 5:45 PM
Outputting documentation to: C:\Windows\system32\CMDocumentation.html
Get-CMSoftwareUpdateDeploymentPackage : Cannot validate argument on parameter 'Id'. The argument is null or empty. Provide an argument that is not null or empty, and then try the command
again.
At \PATH\DocumentConfigMgrCB-master\DocumentCMCB.ps1:5504 char:68
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Completed execution at: 5:59 PM.
Total execution time: 13 minute(s), and 35 second(s).
Currently don't document any of this on the DTs. Will add in future release.
Add switch options for app and device collection detail without using -listfullinformation.
Currently the default Boundary Groups does not include Management Point fallback info.
Many task sequence steps have additional variables in the defaultvarlist property that should be enumerated somewhere/somehow. Will have to do it in a way that doesn't require a ton of customizations between steps.
Dump the client push settings into the documentation.
Get-CMClientPushInstallation
Look at this through WMI remotely on site servers. Key on Specific features that should be installed.
Get-CimInstance -ClassName Win32_OptionalFeature| where {$_.InstallState -eq 1} |FT Caption,Name -AutoSize
InstallState = 1 = This is an installed/enabled feature.
InstallState = 2 = This feature is not installed.
Invalid Namespace happens on the Get-WMIObjects because it tries to connect to the WMI class for the children sites (primary and secondaries) but uses the -Computername of the CAS. Those namespaces of course don't exist on the CAS so it should connect to each SMSProvider of each site server instead.
Default time out is set to 30 seconds. Increased to 2 minutes. Should look to increase to about 5 and provide a variable to easily configure longer if needed.
New stuff for 1806. review or document:
https://docs.microsoft.com/en-us/sccm/core/plan-design/changes/whats-new-in-version-1806
With 1802 release, lets get its information in the doc.
Vs having the full path to each driver in the list, it would be cleaner to use a relative path on each driver since they should all be within the bullet "Source path:".
The script does not account for TS step conditions and it misses any nested task sequences.
Cannot index into a null array.
At C:\Users\MyLocalUser\Desktop\DocumentConfigMgrCB-master\DocumentCMCB.ps1:4254 char:21
Cannot index into a null array.
At C:\Users\MyLocalUser\Desktop\DocumentConfigMgrCB-master\DocumentCMCB.ps1:4254 char:21
I am running SCCM CB 1710 on Server 2016.
After examining the output HTML file, it has detail up to the Task Sequence section.
List collections that a client setting is deployed to. State none if it is not deployed.
Exclude the CMPivot script that is authored and approved by CM. This is for the CMPivot function within SCCM and does not need to be listed. Make sure that it is excluded by author because console allowed me to create my own CMPivot Script.
Examples: Collections, always show built in collections. Always show number with incremental updates enabled.
Applications;
List only App names instead of only "xx applications"
At the end of each section, it would be nice to have a "Back to top" or "Back to table of contents" link.
Much of the time, SQL is on a different box. Would be nice to provide alternative credentials when running to get the data that requires SQL queries.
Please consider adding a -Css or -StyleSheet parameter to apply custom CSS rules to the output? Thank you!
Configurable features from 1902 to document:
It would be helpful to have the deployment ID for applications in the report.
Nice to mask user account names, maybe Server names
If we do not have permissions to SQL server, it may fail out of the script. Look at for sure a switch to "SkipSQLDetails" and perhaps some catching to handle errors and continue with rest of script.
Getting the following error when the script hits the Applications section (error occurs mutliple time)
Get-PWCMPhasedDeployment : Cannot validate argument on parameter 'SiteName'. The argument is null or empty. Provide an argument that is not null or empty, and then try the command again.
At E:\Scripts\DocumentConfigMgrCB-master\DocumentCMCB.ps1:6690 char:113
~~~~~~~~~
And also getting the following errror when processing Task Sequences:
Get-WmiObject : Invalid namespace "Root\SMS\site_DC1"
At E:\Scripts\DocumentConfigMgrCB-master\DocumentCMCB.ps1:7509 char:33
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Script is still writing to the output file, just errors popping up in the console window. We're running CM1910, site version 5.0.8913.1000, single Primary Site. We're using v3.52 of your script
When a task sequence step does not have a description, it carries over the description from the last step that had one.
Put a space in here. Makes for cleaner formatting and word wrapping.
New Stuffs in 1810 to review/add:
https://docs.microsoft.com/en-us/sccm/core/plan-design/changes/whats-new-in-version-1810
CM Scripts query will throw error. Need to check for CM version and if the feature is enabled.
I've recently found you wonderful script, but I wanted additional information on the applications, which currently only documents the standard MSI detection.
I've crudely expanded the section of the code, to include Enhanced MSI detection, File and Folder detections, Registry detections.
I'd like to contribute this code to the project for everyone to enjoy.
Regards
Kent Komeri
Looks like it is putting the package ID here instead of the version.
The list of collections that have service windows, allow them to link to the collection details.
Hi
if you add support for https://github.com/iainbrighton/PScribo you have Word, HTML, Txt etc...
BR,
Itamar
When running this against a less developed environment, threw a few errors because of null/empty input objects.
Change Write-Host, Write-Output, and Write-Verbose calls to use a Write-ProgressEx function that incorporates Write-Progress, verbose output, and CMTrace style logging.
Currently Boundary Groups do not include Relationships and fallback timing or info from the Options tab.
Hi there. Is there any way to obtain the Default Client Settings configured? I am facing some infrastructures where there is not any customized setting configuration. What I have tried by now:
Many thanks again for your amazing work.
I posted this on your blog as well, but it appears people are actively using the issues feature here on github.
Our site code is "ENV" and I think that is causing syntax issues. I used the -verbose switch and here are the details surrounding the errors I get. Any help is greatly appreciated!
PS C:\Temp\DocumentConfigMgrCB-master> .\DocumentCMCB.ps1 -CompanyName "MyCompany" -CompanyLogo "C:\temp\Logo.jpg" -Author "ME" -AddDateTime -verbose
Beginning Execution of version 3.42 at: 9:57 AM
[break]
VERBOSE: Loading 'FormatsToProcess' from path 'E:\Program Files\Microsoft Configuration
Manager\AdminConsole\bin\Microsoft.ConfigurationManagement.PowerShell.Provider.format.ps1xml'.
Import-Module : A drive with the name 'ENV' already exists.
At C:\Temp\DocumentConfigMgrCB-master\DocumentCMCB.ps1:1215 char:3
VERBOSE: Exporting function 'Add-CMDeviceCollectionExcludeMembershipRule'.
VERBOSE: Exporting function 'Add-CMDeviceCollectionIncludeMembershipRule'.
[break]
VERBOSE: Importing function 'Remove-CMUserCollectionQueryMembershipRule'.
VERBOSE: 09/12/2019 09:57:59: Getting Site Information
Get-CMSite : This command cannot be run from the current drive. To run this command you must first connect to a
Configuration Manager drive.
At C:\Temp\DocumentConfigMgrCB-master\DocumentCMCB.ps1:1232 char:12
VERBOSE: 09/12/2019 09:58:00: Completed Checking each site's configuration.
VERBOSE: 09/12/2019 09:58:00: Enumerating all Site Boundaries
Get-CMBoundary : This command cannot be run from the current drive. To run this command you must first connect to a
Configuration Manager drive.
At C:\Temp\DocumentConfigMgrCB-master\DocumentCMCB.ps1:2516 char:15
[end]
At the beginning of each task sequence, list the content that is referenced within the TS.
Software update packages do not word wrap like other fields do, specifically "Source Path".
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.