为什么Windows 7的PowerShell 5不具备与Windows 10相同的功能?

Pae*_*els 6 powershell windows-console powershell-5.0 psreadline

我在Windows 7 SP1计算机上将PowerShell从4.0升级到5.0(2016年2月发布).

$PSVersionTable节目的PowerShell 5.0,但外壳没有在Windows 10中的相同的功能的PowerShell 5.0.

区别:

  • 关键字突出显示
  • 使用Shift +箭头键选择文本
  • 使用Ctrl + C/V复制/粘贴

为什么会有区别?

如何获取/启用这些缺失的功能?

Fro*_* F. 7

某些功能来自Win10中预装的PSReadLine -module.您可以从github手动安装或运行:

Install-Module PSReadLine
Run Code Online (Sandbox Code Playgroud)

某些功能来自Windows 10对控制台主机的增强功能conhost.exe,默认情况下用于powershell和cmd.conhost.exe是Windows本身的一部分,而不是Powershell所属的Windows Management Framework.