Last active
September 19, 2017 14:02
-
-
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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