✨ My personal configuration using Powershell, PSReadline and oh-my-posh for theming.
My Windows Powershell configuration with oh-my-posh and PSReadline.
⚠ You should use a modern console host like ConEmu, Alacritty, Terminus, Hyper, FluentTerminal, or the official Windows Terminal to have a great terminal experience on Windows. ⚠
Get-ExecutionPolicy
Policy table
| Restriced | AllSigned | RemoteSigned | Unrestriced | ByPass |
|———————————————————————————————————————— |——————————————————————————- |———————————————————————————————————————— |—————————————————————————————————————————————————————- |——————————————————————————— |
| No script can be run. Windows Powershell can only be used in interactive mode. | Only scripts signed by a trusted publisher can run. | Download scripts must be signed by a trusted publisher before they can be run. | No restrictions. All scripts can be run, but download scripts will prompt for permission before it runs. | All scripts can be run, without warnings or prompts. |
Example: My Powershell is using RemoteSigned policy
Set-ExecutionPolicy -Scope CurrentUser RemoteSigned
Install-Module -Name PSReadLine -AllowPrerelease -Scope CurrentUser -Force -SkipPublisherCheck
Install-Module -Name PowerShellGet -Force first.
Install-Module oh-my-posh -Scope CurrentUser
(Not necessary)
Install-Module -Name Get-ChildItemColor -AllowPrerelease -Scope CurrentUser -Force -SkipPublisherCheck -AllowClobber
if (!(Test-Path -Path $PROFILE )) {
New-Item -Type File -Path $PROFILE -Force
}
# To open in visual studio code, but you can change it
code $PROFILE