In this blog post, I will cover the steps to improve your Powershell Console Styles! Oh-My-Posh is a Powershell module that turns your standard and boarding console into a console with style and colour! Oh-MyPosh module is supposed on 5.1, 6.x and 7.x as well as VSCode.
> Windows Terminal – Powershell 5.1 – Vanilla No Oh-My-Posh
> Windows Terminal – Powershell 5.1 – Pretty and Colourful (Oh-My-Posh)
Firstly, to be able to enjoy the Oh-My-Posh module you will need to get yourself some Nerd Fonts, What are Nerd Fonts I hear you ask?
To see the icons displayed in Oh My Posh, install a Nerd Font, and configure your terminal to use it.
My current font, I’ve taken a liking for is the “JetBrainsMono Nerd font“
When you have downloaded the font zip file and extracted you need to configure the font locations in three places depends on if your using Powershell (Default Console), Windows Terminal or Visual Studio Code.
For the module, I’ve just installed the JetBrains Mono Regular Nerd Font Complete Windows Compatible.ttf file.
The below shows what the default Windows Powershell Console looks like using a none Nerd Font File.
Configure Fonts for Default Powershell Console.
NOTE: I found that the JetBrainsMono NF Font would not show up under the default command window so had to opt for installing JetBrainsMonoMedium NF
Configure Fonts for Windows Terminal.
Configure Fonts for Visual Studio Code.
The Automated Installation.
Earlier this week, I was chatting with @LuiseFreese and how Oh-My-Posh can improve your terminal session style, and that it’s a pretty straightforward install and configuration. Having jumped off the teams call, I realised that the issue we’d come across was that Powershell has 3 Profile files used depending on if you are running PowerShell 5.x Powershell 7.x or VSCode terminal. These file paths are located under.
So I set about creating a script that checks to ensure that you have some form of Nerd Font installed and then set up the PowerShell Profiles for all three using Symbolic Links, depending on which edition you launch.