Skip to content

Write-SpectreRule

Synopsis

Writes a Spectre horizontal-rule to the console.


Description

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


Examples

This example writes a Spectre rule with the title “My Rule”, centered alignment, and red color.

Write-SpectreRule -Title "My Rule" -Alignment Center -Color Red

Parameters

Title

The title of the rule.

TypeRequiredPositionPipelineInput
[String]true1false

Alignment

The alignment of the text in the rule. Valid values are Left, Center, and Right. 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
[String]false3false

Syntax

Write-SpectreRule [-Title] <String> [[-Alignment] <String>] [[-Color] <String>] [<CommonParameters>]