对为什么必须在 Windows...上安装 PowerShell Core 感到困惑?

Confused about why PowerShell Core has to be installed on Windows...?

所以我刚刚阅读了关于 PowerShell 和 PowerShell Core 之间区别的冗长解释。基本上,后者是 PowerShell 所有未来版本的新名称,现在是开源和跨平台的。

好的。好的。但为什么必须在 Windows 上 安装 ?关键是它已经在 Windows 上了,但是您也可以将它安装在 Linux/macOS 上并像在 Windows 上一样使用它?

为什么在 Windows 上也是 "installation"?那部分对我来说毫无意义。而且这不能用 "it's just released" 来解释,因为显然已经 了……

Powershell Core 是新的通用 Powershell。

Windows 附带 "Windows Powershell",它是 Powershell 核心的前身,在 windows 上只有 运行s,并使用 windows 的方法。 NET 特定的,而不是使用 portable.net 方法。

Powershell Core 正在积极开发和增强,可以在 Windows 和 Linux 系统上 运行,但不包含 Windows-specific方法,因为它旨在跨平台,这会导致一些不兼容性。

Powershell 5.1 函数最终将在未来的某个时候(可能最早在 7.0 版)合并到 PowerShell 核心中,而不是永久地继续构建和维护不同版本的 Powershell,并且需要重新编写已弃用的方法才能使用通用函数。

我上次读到这篇文章时,Redmond 曾预测 Powershell Core 7.0 基本上会取代 Windows 上对 Powershell 5.1 的需求,并将在某些时候成为 Windows 中 Powershell 的预装版本此后点。 (所以服务器人员可能 Windows 2022)