How to Install Oh My Posh on Windows (PowerShell 7 + winget)
If you're using PowerShell 7 on Windows and want to add some visual flair and aesthetic to your terminal, I recommend using Oh My Posh. It is a fantastic tool to get started. It enhances your prompt with themes, git status, icons, and more appealing to the eye.
In this quick guide, I’ll walk you through how to install and configure Oh My Posh using the Windows Package Manager (winget
).
From this:

To this (ignore the blurred out window, that was just a message for updating my PowerShell)

Let's get started
✅ Prerequisites
- PowerShell 7+ installed
- Windows Package Manager (winget)
Winget comes preinstalled on Windows 10 (build 1809+) and Windows 11. You can check it by running:
winget --version
Step 1: Install Oh My Posh using winget
Open your PowerShell 7 terminal as Administrator, then run:
winget install JanDeDobbeleer.OhMyPosh -s winget
This installs the oh-my-posh.exe
CLI tool to your system.
Step 2: Install a Nerd Font
Oh My Posh uses special icons and glyphs provided by Nerd Fonts. You’ll need to install one and set it in your terminal.
For example, to install Meslo Font, enter the command below
oh-my-posh font install

It will prompt you with a list of fonts to install. Use your arrow keys to navigate to the font you want to install.
Press Enter to install


Once installed, ensure that your font is set on your Profile.
Go to your terminal settings (Windows Terminal, VS Code, etc.) and set the font face

Step 3: Set up a theme
Now, configure your PowerShell profile to use Oh My Posh.
- Locate your profile path via PowerShell and open $PROFILE in a text editor
- Add the following line to initialize Oh My Posh with a theme:
oh-my-posh init pwsh --config ~/jandedobbeleer.omp.json | Invoke-Expression
Mine looks like this, though you can ignore lines 2-4 (that's to add additional intellisense to your prompt)

You can replace jandedobbeleer.omp.json
it with any other theme file from the official theme list.
- Save and restart PowerShell to see changes
Step 4: Test It Out
Close and reopen your terminal. You should now see a beautiful and information-rich prompt like this:

Optional: Enhance Your Prompt with Terminal Icons
To make your directory listings more visually appealing, consider installing the Terminal Icons module to make your directory listings more visually appealing. It adds beautiful icons to files and folders in your terminal:
Install-Module -Name Terminal-Icons -Repository PSGallery
Open PowerShell and edit $Profile. e.g. "code $Profile"
Add the import-module command, then re-open PowerShell
oh-my-posh init pwsh --config ~/jandedobbeleer.omp.json | Invoke-Expression
Import-Module -Name Terminal-Icons

Before:

After:

Optional: Add Intellisense to your prompt

If you've installed powershell 7, you can enable the PSReadline Module which enables predictive intellisense based on your command history
PSReadLine Module
- Required: PSReadLine 2.1.0+
(ListView
and predictive IntelliSense are available in PSReadLine 2.1 and above)
Just enter the following commands in PowerShell and it will enable it.
Set-PSReadLineOption -PredictionSource History
Set-PSReadLineOption -PredictionViewStyle ListView
Set-PSReadLineOption -EditMode Windows
Command Explanations
Set-PSReadLineOption -PredictionSource History
Enables predictive IntelliSense based on your command history.
Set-PSReadLineOption -PredictionViewStyle ListView
Shows a dropdown list of suggestions, similar to how suggestions appear in code editors like VS Code.
Set-PSReadLineOption -EditMode Windows
Provides Windows-style keyboard shortcuts (e.g., Ctrl+E
to move to end of line, Ctrl+A
to move to the beginning).
🛠 Pro Tip: List All Themes
To explore other themes:
Get-PoshThemes
Or view them with preview images here: ohmyposh.dev/themes
🎉 That’s It!
You now have a modern, fast, and good-looking PowerShell terminal with Oh My Posh!
If you're managing multiple environments, writing scripts, or just want to look cooler while coding, Oh My Posh is a game-changer.
Found this article useful? Why not buy Phi a coffee to show your appreciation?