Windows 11 - PowerShell Tweaks
Windows 11 - PowerShell Tweaks
Clear Terminal History
PATH: C:\Users\YOURUSERNAME\AppData\Roaming\Microsoft\Windows\PowerShell\PSReadLine\ConsoleHost_history.txt
- Create PROFILE PATH (reference output of
echo $PROFILE
)- Example:
C:\Users\YOURUSERNAME\Documents\PowerShell\Microsoft.PowerShell_profile.ps1
- Example:
Add these commands to the file:
1 2
Clear-History echo "" > C:\Users\YOURUSERNAME\AppData\Roaming\Microsoft\Windows\PowerShell\PSReadLine\ConsoleHost_history.txt
- Save the file and restart the shell
Or type:
1
. $PROFILE
Install WinFetch
Install WinFetch:
1
Install-Script winfetch
Source: WinFetch Installation
Install Oh-My-Posh
Install Oh-My-Posh:
1
winget install JanDeDobbeleer.OhMyPosh -s winget
Install Nerd Font:
1
oh-my-posh font install meslo
- Make sure you change the font in terminal settings to MesloLGM Nerd Font
Set this to
$PROFILE
:1
oh-my-posh init pwsh --config "$env:POSH_THEMES_PATH\jandedobbeleer.omp.json" | Invoke-Expression
Recommend appending this to the top just in case this messes with anything:
1
. $PROFILE
Source: Oh-My-Posh Installation
This post is licensed under CC BY 4.0 by the author.