Windows 11 – Windows Terminal, PowerShell 7 and Oh My Posh

In my opinion, a big update happened in Windows 10 that remained in Windows 11, which was the transition from Command Prompt to Windows Terminal as default terminal client application.

There are several ways of accessing Windows Terminal, but the one I use the most is by right-clicking in the start menu icon and selecting the link for either regular user or privileged/elevated (admin) Windows Terminal.

When Windows Terminal opens it shows that Windows PowerShell is used as default profile and that Windows Terminal can be set as default terminal application.

Windows PowerShell that comes built-in on Windows is great, but Microsoft has an Open Source version of PowerShell, currently in version 7, that is extremely fast and I like it better.

You can either navigate to the link by copying and pasting or typing in your browser or by just holding the CTRL key in your keyboard and using your mouse pointer to click in the link presented in the Windows Terminal application (

You will be redirected to the page that explains the migration steps to latest PowerShell. Sometimes the links to download the installer are outdated, then I prefer to navigate to the installation section, that points us to use the package manager Winget for the installation.

Winget is a package manager similar to the ones used for years in the Linux distributions that Microsoft started to support as part of Windows 10 and Windows 11 products. In Windows 11 it comes installed by default.

More information can be found here Windows Package Manager | Microsoft Learn

This can be done by running the command in Windows Terminal using the PowerShell profile (default).

winget install --id Microsoft.Powershell --source winget

The package manager will download the latest release and start the setup process. If prompted, choose to allow for the installer to make changes to your device.

Now that we have latest PowerShell installed, before switching the default profile, I like to include in my setup the installation and configuration of a tool called Oh My Posh. I heard about this tool from an online sharing by Scott Hanselman a while back. By the way, Scott has great technical content on his blog. If you want to check it out, here is the link Scott Hanselman – Coder, Blogger, Teacher, Speaker, Author

I knew Oh My Zsh from my adventures in Mac OS and Linux, which you can find here Oh My Zsh – a delightful & open source framework for Zsh, but felt completely compeled to adopt Oh My Posh on Windows.

Oh My Posh it is a theme engine for shell that can be used to enhanced how things are displayed in Windows Terminal, for example, in a PowerShell session. The official website can be found here Home | Oh My Posh

By clicking in Get Started you will be redirected to the documentation area.

Oh My Posh can also be installed via Winget by using the following command:

winget install --id JanDeDobbeleer.OhMyPosh --source winget

Next, let’s close the window and open Windows Terminal again, but this time in admin mode. We will use Oh My Posh tool to install a custom font, which requires elevated permissions. Details can be found here Fonts | Oh My Posh

To open the menu that allows for selecting the desired font for installation execute the following command:

oh-my-posh font install

Then select the desired font and hit Enter. I like the RobotoMono font a lot as I found it makes the terminal crispy and clear, so I will choose this one.

We can now close the admin terminal and open again the regular user one.

There are various themes built-in when Oh My Posh is installed. They are documented here Themes | Oh My Posh. You can also create your own.

The theme I personally use it is called blue-owl.

You can try multiple options before you configure one to be loaded with the terminal by replacing the name of the theme that relates to the .json file in the following command:

oh-my-posh init pwsh --config "$env:POSH_THEMES_PATH/blue-owl.omp.json" | Invoke-Expression

You will see that the result is not quite what you expect as the default font will not allow for the details to be loaded properly.

Let’s change the default settings and see how it looks like afterwards. Click in the down caret close the the plus (+) sign and then in Settings.

We will first change the startup settings by using PowerShell (which is the PowerShell 7 we have installed) as default profile and setting default terminal application to Windows Terminal, then click Save.

Next, under Profiles – Defaults – Appearance, change Font face to the one you have downloaded and installed, in my case is RobotoMono NFM and I prefer to use Font size 14. After choosing your preference, click Save.

When you reopen Windows Terminal you will see that now PowerShell 7 was the loaded version and you will need to run the command to load the theme again.

oh-my-posh init pwsh --config "$env:POSH_THEMES_PATH/blue-owl.omp.json" | Invoke-Expression

The result looks something like this:

If you are satisfied, you can paste the command to load the theme in the PowerShell profile, which is similar to ~/.bashrc or ~/.zshrc in Linux or Mac. You can open the profile in notepad or another editor (such as Visual Studio Code if you already have it installed). To verify the location of the profile configuration file use the following in Windows Terminal:


If the file was never wrriten to, before changing the contents, create the file by using the following command:

New-Item $PROFILE -type file -Force

The -Force parameter will create the directory as well if does not exist.

Then open the file:

notepad $PROFILE

Type the theme load command on it, save and close it. To verify the contents of the file you can use the type command.


You should see the following:

Close the Windows Terminal and re-open. You should now see the theme to be loaded automatically.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s