Skip to content

Instantly share code, notes, and snippets.

@mrichman
Last active September 19, 2017 14:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mrichman/f21620f8f15fd9a6bd1267ad70bbb055 to your computer and use it in GitHub Desktop.
Save mrichman/f21620f8f15fd9a6bd1267ad70bbb055 to your computer and use it in GitHub Desktop.
Export a PowerShell module's documentation in Markdown format. Files written to temp directory as "<Module>Documentation". The platyPS module can be installed via PowerShell Gallery: Install-Module -Name platyPS.
#requires -module platyPS
<#
.SYNOPSIS
Export a module's documentation in markdown.
.DESCRIPTION
Export a module's documentation in markdown.
.EXAMPLE
./Export-ModuleDocumentation.ps1 -Module MarkdownPS
#>
param(
[Parameter(Mandatory=$true)]
[string]$Module
)
$exportPath=Join-Path $env:TEMP "$($Module)Documentation"
Remove-Item $exportPath -Force -Recurse -ErrorAction SilentlyContinue
$null=New-Item -Path $exportPath -ItemType Directory
New-MarkdownHelp -Module Team -OutputFolder $exportPath -NoMetadata -Force
Write-Host "Module help exported in $exportPath"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment