Automated Documentation
This guide shows you how to use existing 3rd party Powershell tools to automate the generation of documentation.
M365Documentation
This GH repository streamlines the generation of documentation for Microsoft 365 products.
Installation
Install the following modules from the PowerShell Gallery:
Install-Module MSAL.PS -scope currentuser
Install-Module PSWriteWord -scope currentuser
Install-Module M365Documentation -scope currentuserAutomatic Intune Documentation
Connect and authenticate to the cloud servers.
Connect-M365DocThen you can generate a report for the “Intune Component” of MS365 with this command:
$doc = Get-M365Doc -Components IntuneTo exclude certain sections such as mobile apps:
$doc = Get-M365Doc -Components Intune -ExcludeSections "MobileAppDetailed"Output the documentation to a word file
$doc | Write-M365DocWord -FullDocumentationPath "$env:USERPROFILE\Downloads\$($doc.CreationDate.ToString("yyyyMMddHHmm"))-Xenter-Documentation.docx"Install pandoc (required for step 5)
winget install --source winget --exact --id JohnMacFarlane.PandocConvert from docx to markdown, then upload the audit to the Documentation repository on Github
pandoc -f docx -t gfm documentation.docx -o documentation.md