Public/Show-specSectionHeader.ps1

function Show-specSectionHeader {
    <#
    .SYNOPSIS
    Displays a formatted and colourised section header in the console.
 
    .DESCRIPTION
    The Show-specSectionHeader function prints a visually distinct section header for use within scripts,
    making output easier to read and logically separated. It includes a prefix label (such as [PSE], [INFO], or [TASK])
    and a title provided by the user. The header is displayed between two cyan divider lines for clear visual structure.
 
    .PARAMETER Title
    Specifies the title text to display within the section header. This parameter is mandatory.
 
    .PARAMETER Colour
    Defines the text colour of the section header title. Acceptable values include:
    Cyan, DarkCyan, Yellow, Red, Magenta, Green, and DarkGreen.
    The default value is Cyan.
 
    .PARAMETER Prefix
    Specifies the prefix label to display before the title. Valid values are:
    PSE, INFO, and TASK.
    The default value is PSE.
 
    .EXAMPLE
    Show-specSectionHeader -Title "Device Attributes Section"
 
    Displays a section header labelled [PSE] Device Attributes Section in cyan text with cyan dividers.
 
    .EXAMPLE
    Show-specSectionHeader -Title "Azure Table Retrieval" -Colour Yellow -Prefix INFO
 
    Displays a section header labelled [INFO] Azure Table Retrieval in yellow text, framed by cyan dividers.
 
    .NOTES
    Author: owen.heaume
    Version: 1.0
    #>


    param(
        [Parameter(Mandatory)]
        [string]$Title,

        [ValidateSet('Cyan', 'DarkCyan', 'Yellow', 'Red', 'Magenta', 'Green', 'DarkGreen')]
        [string]$Colour = 'Cyan',

        [ValidateSet('PSE', 'INFO', 'TASK')]
        [string]$Prefix = 'PSE'
    )

    Write-Host ''
    Write-Host ('=' * 60) -ForegroundColor DarkCyan
    Write-Host ('[{0}] {1}' -f $Prefix, $Title) -ForegroundColor $Colour
    Write-Host ('=' * 60) -ForegroundColor DarkCyan
}