Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ishu3101/psmarkdown
Powershell Module to convert from a PowerShell object to a Markdown table and back
https://github.com/ishu3101/psmarkdown
markdown powershell powershell-core powershell-modules
Last synced: 3 months ago
JSON representation
Powershell Module to convert from a PowerShell object to a Markdown table and back
- Host: GitHub
- URL: https://github.com/ishu3101/psmarkdown
- Owner: ishu3101
- License: mit
- Created: 2015-11-24T22:44:43.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2021-04-22T20:17:22.000Z (over 3 years ago)
- Last Synced: 2024-09-28T04:21:51.113Z (3 months ago)
- Topics: markdown, powershell, powershell-core, powershell-modules
- Language: PowerShell
- Homepage:
- Size: 12.7 KB
- Stars: 23
- Watchers: 2
- Forks: 8
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# PSMarkdown
A Powershell Module that lets you convert from a PowerShell object to a Markdown table and back.## Table of Contents
* [Install](#install)
* [Getting Started](#getting-started)
* [Get Help](#get-help)
* [Commands](#commands)
* [ConvertTo-Markdown](#convertto-markdown)
* [ConvertFrom-Markdown](#convertfrom-markdown)
* [Credit](#credit)
* [License](#license)## Install
There are two ways to install this module. If you are running PowerShell v5
```powershell
Install-Module PSMarkdown
```Otherwise, to install in your personal modules folder (e.g. ~\Documents\WindowsPowerShell\Modules), run:
```powershell
iex (new-object System.Net.WebClient).DownloadString('https://raw.github.com/ishu3101/PSMarkdown/master/Install.ps1')
```## Getting Started
To start using, just import the module using
```powershell
Import-Module PSMarkdown
```After installation, the following commands are available: `ConvertTo-Markdown, ConvertFrom-Markdown`
## Get Help
* List of all available commands
```powershell
Get-Command -Module PSMarkdown
```* Help for a specific command.
```powershell
Get-Help
```## Commands
***For more detailed information about a command use the help***
### ConvertTo-Markdown
Converts a PowerShell object to a Markdown table.#### Usage
```powershell
ConvertTo-Markdown [-InputObject] []
```#### Example
```powershell
Get-Process | Where-Object {$_.mainWindowTitle} | Select-Object ID, Name, Path, Company | ConvertTo-Markdown
``````powershell
ConvertTo-Markdown (Get-Date)
``````powershell
Get-Alias | Select-Object Name, DisplayName | ConvertTo-Markdown
```### ConvertFrom-Markdown
Converts a Markdown table to a PowerShell object.#### Usage
```powershell
ConvertFrom-Markdown [-InputObject] []
```#### Example
```powershell
Get-Service | Select-Object Name, DisplayName, Status | ConvertTo-Markdown | ConvertFrom-Markdown
``````powershell
Get-Process | Unique | Select-Object Name, Path, Company | ConvertTo-Markdown | ConvertFrom-Markdown
``````powershell
ConvertTo-Markdown (Get-Service | Where-Object {$_.Status -eq "Running"} | Select-Object Name, DisplayName, Status) | ConvertFrom-Markdown
```## Credit
Thanks [Ben Neise](https://github.com/GuruAnt) for the initial code for [ConvertTo-Markdown](https://gist.github.com/GuruAnt/4c837213d0f313715a93) function
## License
PSMarkdown is released under the MIT license. See [LICENSE](LICENSE) for details.