powershell: 尝试新的跨平台 PowerShell https://aka.ms/pscore6
错误分析
powershell 版本过老,提示更新

修复错误
进入 https://github.com/PowerShell/PowerShell/releases/ 寻找合适的版本 (推荐最新版) 进行下载并安装

可以按照以下步骤将 Powershell7 添加到鼠标右键选项中:
保存以下代码在
pwsh.reg
文件中:
1
2
3
4
5
6
7
8
9
10 Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\Directory\Background\shell\pwsh7]
@="在此处打开 Powershell7 窗口"
"Extended"=""
"Icon"="C:\Program Files\PowerShell\7\pwsh.exe"
"ShowBasedOnVelocityId"=dword:00639bc8
[HKEY_CLASSES_ROOT\Directory\Background\shell\pwsh7\command]
@="C:\Program Files\PowerShell\7\pwsh.exe -noexit -command Set-Location -literalPath '%V'"然后双击文件
pwsh.reg
即可