[研究]PowerShell安裝 (Windows Server 2019)
2025-03-20
其實Windows Server 2019 安裝完成後,就已經預先安裝了 PowerShell 5.1。
********************************************************************************
【下載、安裝新版PowerShell】
PowerShell 網站
https://github.com/PowerShell/PowerShell/releases
https://github.com/PowerShell/PowerShell/tags
********************************************************************************
PowerShell 7.5 和 5.1 差異
差異點 | PowerShell 5.1 (Windows PowerShell) | PowerShell 7.5 (PowerShell Core) |
架構 | .NET Framework | .NET (原 .NET Core) |
跨平台 | 僅支援 Windows | 支援 Windows、Linux、macOS |
效能 | 較低 | 更快、更高效 |
支援狀態 | 進入維護模式,不再新增功能 | 持續開發中 |
模組相容性 | 與大多數 Windows 模組相容 | 透過 WindowsCompatibility 模組提供支援 |
內建命令 | 傳統命令 | 更多現代化命令 (例如 ForEach-Object -Parallel) |
JSON 處理 | ConvertTo-Json 效能較低 | ConvertTo-Json 效能更好 |
背景作業 | Start-Job 需 PowerShell 進程 | Start-Job 原生支援跨平台背景工作 |
SSH 支援 | 不支援內建 SSH 遠端連線 | 內建支援 SSH 遠端連線 |
容器支援 | 無內建支援 | 更好的容器支援 |
更新方式 | 透過 Windows 更新或手動下載 | 透過 winget、brew、apt 等套件管理工具安裝 |
(完)
沒有留言:
張貼留言