Powershell 5 is for babies and communists. Real developers run Windows Terminal with Powershell 7 and they pimp it out hard.
To get started you should already have Windows Terminal installed as they have been pushing it for a long time now. If you don’t have it yet you can get it from the Microsoft Store here: https://aka.ms/terminal
Click your start button type Terminal and it should come up. Right click it and open as Administror.
Now we’re going to install Powershell 7 via winget. Type the following command and hit enter.
winget install Microsoft.PowerShell
That will ask for permission and do some stuff
Click the dropdown arrow at the top of the terminal window and see if Powershell is there, if not you’ll need to close and reopen terminal.
ok now lets install oh my posh via winget
winget install JanDeDobbeleer.OhMyPosh
Once that is done we can use it to install a special font, sometimes called a nerd font, which I hate but it is what it is. I think Caskadia Code, JetBrains Mono are good but Maple Mono is a pretty good choice but you can obviously download a bunch and see what works best for you. You can download Maple from here directly, You want the NF version, I go for No-Ligature but you do you. https://github.com/subframe7536/maple-font/releases
oh-my-posh font install
When that is done lets pop into settings and make a few tweaks. Click the dropdown next to the new tab button, click settings and lets change the default profile to Powershell, and make it match the screenshot.
Then on the left click on Powershell and then on the right click on Appearance.
We want to set the color scheme to One Half Dark, set the font face to Maple Mono and kick the font size up a bit.
Ok, now we’ll install some terminal icons via Powershell. Open a new Powershell tab and run the following command:
Install-Module -Name Terminal-Icons -Repository PSGallery
Create a folder in your Documents folder called PowerShell
Put the attached file Microsoft.PowerShell_profile.ps1 into it but remember to fix the path inside. Microsoft.PowerShell_profile.ps1 The contents of the file are:
oh-my-posh --init --shell pwsh --config C:\OhMyPoshTheme\AdamCustom.json | Invoke-Expression
Import-Module -Name Terminal-Icons
[console]::InputEncoding = [console]::OutputEncoding = [System.Text.UTF8Encoding]::new()
I have a pretty great custom theme you can download
Or you can be lame and use one if the ones they have posted.
See here: https://ohmyposh.dev/docs/themes
With that done one way or another you’ll need to run this:
Unblock-File -Path $PROFILE
Once that is all complete you should be able to open a new tab and it should look glorious
For cmd.exe, which you’ll still need from time to time, the following steps are required to enable Unicode and Emoji support.
Run intl.cpl.
Click the Administrative tab
Click the Change system locale button.
Check the "Use Unicode UTF-8 for worldwide language support" checkbox.
Reboot.
If you want to always have preset tabs open when you launch terminal you can set that up by going to settings and clicking on the Open JSON file button in the lower left corner the editing or adding the optional “startupActions” property like so:
"startupActions": "new-tab -p \"PowerShell\" --title \"Backup\" -d C:\\Code\\backup ; new-tab -p \"PowerShell\" --title \"Testing\" -d C:\\Testing",