Skip to content

Write-SpectreRule

Description

The Write-SpectreRule function writes a Spectre horizontal-rule to the console with the specified title, alignment, and color.


Examples

Example 1
This example demonstrates how to write a rule to the console.

Terminal window
Write-SpectreRule -Title "My Rule" -Alignment Center -Color Yellow

Parameters

Title

The title of the rule.

TypeRequiredPositionPipelineInput
[String]false1false

Alignment

The alignment of the text in the rule. The default value is Left.

Valid Values:

  • Left
  • Right
  • Center
TypeRequiredPositionPipelineInput
[String]false2false

Color

The color of the rule. The default value is the accent color of the script.

TypeRequiredPositionPipelineInput
[Color]false3false

LineColor

TypeRequiredPositionPipelineInput
[Color]false4false

PassThru

Returns the Spectre Rule object instead of writing it to the console.

TypeRequiredPositionPipelineInput
[Switch]falsenamedfalse

Syntax

Terminal window
Write-SpectreRule [[-Title] <String>] [[-Alignment] <String>] [[-Color] <Color>] [[-LineColor] <Color>] [-PassThru] [<CommonParameters>]