Set Permission in Windows Powershell
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
also open the VS code and open the terminal and use the same command to set policy in the VS code terminal
Install the 'oh my posh'
by either visiting this or use the below command.
winget install JanDeDobbeleer.OhMyPosh -s winget
Install fonts
oh-my-posh font install meslo
- 'meslo' worked well for all themes i tested, if the theme text is breaking try using other font
Edit the terminal configs
Modify the settings.json of the terminal
- open the terminal as an admin user
- press CTRL + SHIFT + ,
- this will open or prompt to select your favorite editor for the 'settings.json'
"profiles":
{
"defaults": {
"font":
{
"face": "MesloLGM Nerd Font"
}
}
...
- save it
Modify the settings of VS code integrated terminal
- go to File -> Preferences -> Settings
- search for @feature:terminal font
- add the font 'MesloLGM Nerd Font'
- save it (CTRL + S)
Install the theme - [official documentation]
Create a profile file
Create a new profile file manually
- create a file
- rename it to
Microsoft.PowerShell_profile.ps1 - move it to
C:\Users\<user-name>\OneDrive\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1
Automatically create a profile file
- open the terminal
- create a new profile by running the following command
New-Item -Path $PROFILE -Type File -Force
- this will create a file at
C:\Users\<user-name>\OneDrive\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1
Add the content to the profile file
- for example I'll use '1_shell' theme
- add the below line to the newly created profile file
oh-my-posh init pwsh --config 'https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/1_shell.omp.json' | Invoke-Expression
- replace
1_shell.omp.jsonwith the omp.json of the desired theme name- theme name can be found here
- restart the terminal
Note: if no --config flag is provided then the default theme will be used
That's it, now you are a 10X developer 😝

Top comments (2)
I am getting an Error When I restart the Windows Powershell.
The $PROFILE is not Loading
looks like some misconfiguration that you did while setting up the $profile, check the content of it