oh-my-posh

Pretty Powershell

I started using Microsoft Windows Powershell after a long time(may be 10 years) after I found out that I can make Powershell look prettier.

This is how my Powershell looks now. —

Yes!! its pretty now and more fun to use.

Firsts things first!!

Windows Terminal

First thing to do is make sure you have installed Windows Powershell from Microsoft store. If not, search Powershell in microsoft store and install it. This is new, upgraded and even has built in support for WSL, CMD, Azure, Linux and much more.. Check this

Step 2.

Oh My Posh

The tool that is needed at the bottom of Powershell is Oh My Posh. To install it, run the following command in your terminal. A protip, hold Ctrl+Shift when launching terminal to open it as Administrator.

winget install JanDeDobbeleer.OhMyPosh -s winget

Next, configure Powershell to use Oh-My-Posh. To do it, open Powershell profile in a text editor. Add the following line to the end of your profile:

oh-my-posh init pwsh | Invoke-Expression

Now, restart Powershell and set up a theme for Oh-My-Posh. Open your Powershell profile in a text editor(I use Microsoft VS Code) and paste the following:

oh-my-posh init pwsh | Invoke-Expression

then,

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

Next, replace night-owl.omp.json with the name of your preferred theme file.

Congratulations!!! your new prettier Microsoft Powershell is ready to use.

Happy coding!!!!

If you have any questions or stuck at any point, feel free to ask questions in the comment section. I check my blog messages daily and will reply you back at earliest.

If you like this post then feel free to drop comments. This will motivate me to do similar work more in the future and bring new things to my audience. Also, you can join me through membership and buy me a coffee every month to get exclusive Merch.

About the author

Kush

Hi there! I am a Software Engineer by profession and this is my so called presence on the web. I live in Australia, love to travel to new places, I am a foodie! and my favorite drink is lemonade only made by me!!!

View all posts