PlatyPS is the tool that Microsoft uses to create the PowerShell content you get from Get-Help
and build the content published as PowerShell documentation on Microsoft Learn.
PowerShell help files are stored as Microsoft Assistance Markup Language (MAML), an XML format. PlatyPS simplifies the authoring process by allowing you to write the help files in Markdown, then convert to MAML. Markdown is widely used in the software industry, supported by many editors including Visual Studio Code, and easier to author.
Microsoft.PowerShell.PlatyPS includes several improvements:
- Re-write in C# leveraging markdig for parsing Markdown (the same library used by Microsoft Learn to render Markdown)
- Provides a more accurate description of a PowerShell cmdlet and its parameters and includes information that was previously unavailable
- Creates an object model of the help file that you can manipulate and supports chaining cmdlets for complex operations
- Increased performance - processes 1000s of Markdown files in seconds
PlatyPS runs on:
- Windows PowerShell 5.1+
- PowerShell 7+ on Windows, Linux, and macOS
Install the module from PSGallery.
Install-PSResource -Name Microsoft.PowerShell.PlatyPS
main
: Contains the source code for the new version of PlatyPS named Microsoft.PowerShell.PlatyPS. This is the current supported version of PlatyPS. You can find this version listed as Microsoft.PowerShell.PlatyPS in the PowerShell Gallery.v1
: Contains the source code for the legacy version of PlatyPS named platyPS. This version is no longer actively maintained, but it's available for reference and legacy support. The latest version of this code is 0.14.2. You can find this version listed as platyPS in the PowerShell Gallery.
docs
- contains design documentation for the PlatyPS projectsrc
- contains the source code for the moduletest
- contains the tests files used to validate the code at build timetools
- contains tools used to build the module
If you are interested in contributing to the PlatyPS project, please see the contribution guide.
Prerequisites for build:
- PS7
- .NET 8 SDK
Prerequisites for test:
- Pester 4.x (Pester 5.x is not supported)
To build the source code, run the following command in the root of the repository:
.\build.ps1 -Clean