Set-Title.psm1

function Set-Title {
    <#
       .SYNOPSIS
       Set the terminal title
 
       .DESCRIPTION
       A wrong but quick way to set the terminal title. A kind of setter of the variable "$host.ui.RawUI.WindowTitle".
 
       .PARAMETER WindowTitle
       Whatever you want to see in the title of the terminal window. Say, "Project Nemesis" or like that.
 
       .EXAMPLE
       Set-Title -WindowsTitle "Project Nemesis"
 
       .EXAMPLE
       Set-Title "Project Nemesis"
 
       .NOTES
        You can't teach an old dog new tricks. Especially if the new trick is something counterintuitive.
       #>



    [CmdletBinding()]
    param(
        [Parameter(Position = 1)]
        [string]$WindowTitle
    )

    begin {

        $host.ui.RawUI.WindowTitle = $WindowTitle
    }
}

# if not specified, all functions will be exported
Export-ModuleMember -Function 'Set-Title'