| external help file | PSScriptTools-help.xml |
|---|---|
| Module Name | PSScriptTools |
| online version | https://jdhitsolutions.com/yourls/d06a7d |
| schema | 2.0.0 |
Display text in a lined border box.
Format-BorderBox [-Text] <String[]> [[-Title] <String>] [[-BorderColor] <String>]
[<CommonParameters>]Use this command to display a block of text in a colored lined border box. You can use ANSI or PSStyle to specify the line color. It is recommended that the lines of text are trimmed of extra spaces.
This command will not run in the Windows PowerShell ISE.
PS C:\> Get-WindowsVersionString | Format-BorderBox -Title "OS Information"
╭──OS Information─────────────────────────────────────────────────────────────╮
│ CADENZA Microsoft Windows 11 Pro Version Professional (OS Build 26200.8894) │
╰─────────────────────────────────────────────────────────────────────────────╯Display Windows version information in a lined box. The default border color is bright green. Note that the border may not be displayed properly in PowerShell help.
PS C:\> (pswho -AsString).split("`n").Trim() | fbx -Title PSWho -bc "`e[38;5;192m"
╭──PSWho────────────────────────────────────────────────────────────╮
│ User : Cadenza\jeff │
│ Elevated : True │
│ Computername : CADENZA │
│ OperatingSystem : Microsoft Windows 11 Pro [ARM 64-bit Processor] │
│ OSVersion : 10.0.26200 │
│ PSVersion : 7.6.4 │
│ Edition : Core │
│ PSHost : ConsoleHost │
│ WSMan : 3.0 │
│ ExecutionPolicy : RemoteSigned │
│ Culture : English (United States) │
╰───────────────────────────────────────────────────────────────────╯The command needs an array of trimmed strings. This example is using command and parameter aliases.
Specify an ANSI or PSStyle sequence for the border color. The default is bright green.
Type: String
Parameter Sets: (All)
Aliases: bc
Required: False
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseEnter the text to be displayed in the box. You can enter an array of strings including blank lines. It is recommended that you trim lines of extra spaces.
Type: String[]
Parameter Sets: (All)
Aliases:
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: FalseEnter an optional title.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseThis cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
This command has an alias of fbx.
Learn more about PowerShell: http://jdhitsolutions.com/yourls/newsletter