Install
PwshSpectreConsole is a wrapper for the awesome Spectre Console which you can use to make your PowerShell scripts more interesting.
Install PwshSpectreConsole from PSGallery using the following command in your terminal (this requires PowerShell 7+):
Install-Module PwshSpectreConsole -Scope CurrentUser
đź‘» Emoji Support and Line Drawing
With the default configuration Windows Terminal and the older console host don’t support the full range of Spectre Console features. It will still work but you will find it doesn’t look quite like all the examples.
It will look like this:
Instead of this:
To get the full feature set:
-
Use Windows Terminal instead of the old console host.
-
Install a NerdFont, a font with additional visual characters. I use “Cascadia Cove NF” from https://www.nerdfonts.com/
-
Enable full unicode by adding the following as the FIRST LINE in your
$PROFILE
file:$OutputEncoding = [console]::InputEncoding = [console]::OutputEncoding = New-Object System.Text.UTF8Encoding
Your profile file can be located by typing
$PROFILE
in your terminal, the path will be similar toC:\Users\shaun\Documents\PowerShell\Microsoft.PowerShell_profile.ps1
. Your profile is loaded every time you open a terminal session so you can put other config in there too like your own custom functions and aliases.
For more details see the instructions on the official Spectre Console site to configure Windows Terminal for full Unicode and Emoji support.