A Powershell Module that lets you convert from a PowerShell object to a Markdown table and back.
There are two ways to install this module. If you are running PowerShell v5
Install-Module PSMarkdown
Otherwise, to install in your personal modules folder (e.g. ~\Documents\WindowsPowerShell\Modules), run:
iex (new-object System.Net.WebClient).DownloadString('https://raw.github.com/ishu3101/PSMarkdown/master/Install.ps1')
To start using, just import the module using
Import-Module PSMarkdown
After installation, the following commands are available: ConvertTo-Markdown, ConvertFrom-Markdown
-
List of all available commands
Get-Command -Module PSMarkdown
-
Help for a specific command.
Get-Help <command>
For more detailed information about a command use the help
Converts a PowerShell object to a Markdown table.
ConvertTo-Markdown [-InputObject] <PSObject[]> [<CommonParameters>]
Get-Process | Where-Object {$_.mainWindowTitle} | Select-Object ID, Name, Path, Company | ConvertTo-Markdown
ConvertTo-Markdown (Get-Date)
Get-Alias | Select-Object Name, DisplayName | ConvertTo-Markdown
Converts a Markdown table to a PowerShell object.
ConvertFrom-Markdown [-InputObject] <Object> [<CommonParameters>]
Get-Service | Select-Object Name, DisplayName, Status | ConvertTo-Markdown | ConvertFrom-Markdown
Get-Process | Unique | Select-Object Name, Path, Company | ConvertTo-Markdown | ConvertFrom-Markdown
ConvertTo-Markdown (Get-Service | Where-Object {$_.Status -eq "Running"} | Select-Object Name, DisplayName, Status) | ConvertFrom-Markdown
Thanks Ben Neise for the initial code for ConvertTo-Markdown function
PSMarkdown is released under the MIT license. See LICENSE for details.