Do you want to make your PowerShell prompt colorful? Please read this article to make your PowerShell Terminal colorful and Git supported. I will use oh-my-posh git prompt engine to make my PowerShell colorful.
Follow me now! 🏃
Run on admin PowerShell
Install-Module posh-git -Scope CurrentUser
If you are using PowerShell 7 then use below script to install posh-git
PowerShellGet\\Install-Module posh-git -Scope CurrentUser -AllowPrerelease -Force
Run on admin PowerShell
Install-Module oh-my-posh -Scope CurrentUser
If you are using PowerShell 7 then use below script to install oh-my-posh
Install-Module oh-my-posh -Scope CurrentUser -AllowPrerelease -Force
View themes in GitHub
Here are some top listed Nerd Fonts
Run on admin PowerShell to setup
Set-PoshPrompt -Theme agnoster
You can setup custom theme as well learn more…
Now you can see colors are coming 😃 However, we have to fix the fonts I will explain next that. For Now lets make this colors as our default in PowerShell. Follow me in next steps.
Notice, once you close this PowerShell and open new then colors will go away. In order to make this permanent you must update the profile of PowerShell.
Most of the time we don’t have any profile
test-path $profile if this returns
False then you must create new one.
New-Item -path $profile -type file –force
Notice new profile file created it is empty now.
Now open PowerShell profile file and paste below code to setup default colors. Save and close the file.
Set-PoshPrompt -Theme Paradox
Close and reopen PowerShell terminal to see the effects.
Notice our PowerShell shows lots of
? because we are missing required fonts.
Lets fix them.
Oh my Posh was designed to use Nerd Fonts. Nerd Fonts are popular fonts that are patched to include icons.
- On windows machine go to the link and download your favorite fonts.
- Right click on the specific font face & “Install for all users”. Check the GIF for clarification where I’m using the
3270 Nerd Fontface.
- Open PowerShell
- Right Click Properties next go to font Tab.
- Search for
3270Medium Nerd Fontand select ok.
Now open new PowerShell Terminal and enjoy your brand new colorful theme.
First browse all themes and select yours one.
I am going to select
jandedobbeleer theme this time.
Now open the PowerShell profile and update the theme name.
Set-PoshPrompt -Theme jandedobbeleer
Open user settings in
json and paste below code.
"terminal.integrated.fontFamily": "'MesloLGL NF'", 👈
If you are using
Fira Code then change the
Download the Microsoft Terminal and open the settings on JSON and update the
FontFace like below.
// Put settings here that you want to apply to all profiles.
"fontFace": "MesloLGL NF"
Thanks for reading my article till end. I hope you learned something special today. If you enjoyed this article then please share to your friends and if you have suggestions or thoughts to share with me then please write in the comment box.
- Please subscribe to All-Access Membership PRO plan to access current and future angular, node.js and related courses.
- Please subscribe to All-Access Membership ELITE plan to get everything from PRO plan. Additionally, you will get access to a monthly live Q&A video call with
Rupeshand you can ask doubts/questions and get more help, tips and tricks.
Your bright future is awaiting for you so visit today FullstackMaster and allow me to help you to board on your dream software company as a new Software Developer, Architect or Lead Engineer role.