First things first: Get the new Powershell from GitHub (https://github.com/PowerShell/PowerShell/)
Step 1: Depending on the variant you have chosen to get the new Powershell (MSI vs. ZIP) you possibly have to add a system path to the binary folder (or have too add the full path in the registry later on).
– MSI: Not necessary (if selected in the installation wizard)
– ZIP: Necessary
Default installation path: C:\Program Files\PowerShell\7\
Step 2: To add an entry in the context menu you have to modifiy the registry from windows. You can either do this directly there or use a tool which does it for you.
Windows Registry Editor Version 5.00 [HKEY_CLASSES_ROOT\Directory\Background\shell\Powershell_v7] @="PowerShell v7" "Extended"="" [HKEY_CLASSES_ROOT\Directory\Background\shell\Powershell_v7\command] @="pwsh.exe"
The ‘Extended’ key means you have to press shift next to the right click to see the ‘PowerShell v7’ entry in the context menu.