Skip to content

Set-MarkdownTable

SYNOPSIS

Converts objects from a script block into a Markdown table.

SYNTAX

__AllParameterSets

Set-MarkdownTable [-InputScriptBlock] <scriptblock> [<CommonParameters>]

ALIASES

This cmdlet has the following aliases, {{Insert list of aliases}}

DESCRIPTION

The Set-MarkdownTable function executes a provided script block and formats the resulting objects as a Markdown table. Each property of the objects becomes a column, and each object becomes a row in the table. If no objects are returned, a warning is displayed, and no output is produced.

EXAMPLES

EXAMPLE 1

Table { Get-Process | Select-Object -First 3 Name, ID }

Output:

| Name | ID |
| ---- | -- |
| notepad | 1234 |
| explorer | 5678 |
| chrome | 91011 |

Generates a Markdown table from the first three processes, displaying their Name and ID properties.

PARAMETERS

-InputScriptBlock

Script block containing commands whose output will be converted into a Markdown table.

Type: System.Management.Automation.ScriptBlock
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: 0
  IsRequired: true
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

OUTPUTS

string

{{ Fill in the Description }}

System.String

{{ Fill in the Description }}

NOTES

The Markdown-formatted table as a string output.

This function returns a Markdown-formatted table string, which can be used in documentation or exported.