Add PowerShell to context menu (Windows)

1. Get PowerShell

winget install --id Microsoft.PowerShell --source winget

Alternative: Microsoft Store


2. Add registry keys

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\Directory\Background\shell\Powershell_v7]
"(Default)"="Open PowerShell window here (v7)"
"Extended"=""

[HKEY_CLASSES_ROOT\Directory\Background\shell\Powershell_v7\command]
"(Default)"="pwsh.exe" 

The “Extended” key means you have to press shift next to the right click.