How to setup PowerShell with bash shortcuts

TL;DR — Enable Emacs shortcuts (PS6 & PS7)

Steps:

\> Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
\> mkdir $(Split-Path $PROFILE)
\> echo "Set-PSReadLineOption -EditMode Emacs" >> $PROFILE
\> & $PROFILE

Explanation:

Say Hi to PowerShell

(Get-Host).Version
PowerShell version
PowerShell-7.1.1-win-x64.msi

Say Hi to «Windows Terminal»

windows terminal in the start menu
global unique id of PowerShell 7
Paste gui as default Profile

PowerShell Configuration

Get-ExecutionPolicy -List
Undefined Policy to all scopes
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
Set RemotedSigned to CurrentUser
mkdir $(Split-Path $PROFILE)
Create PowerShell Scope’s Folder
notepad $PROFILE
& $PROFILE

Extra

C-j as Enter

Set-PSReadLineKeyHandler -Chord ctrl+j -Function AcceptLine

Cheatsheet