PowerShell 版本升级教程

查看当前的 PowerShell 版本

复制代码
$PSVersionTable

可以看到我当前的版本是 5.1

查看目前最新的版本

复制代码
winget search Microsoft.PowerShell

winget 的安装可以看我这篇文章:winget 安装教程-CSDN博客

我选择上面这个版本

安装最新版本【命令行方式】

复制代码
winget install --id Microsoft.PowerShell --source winget

--source winget:指定从官方的 winget 源下载

安装成功

也可以手动安装

访问 GitHub,链接如下

https://github.com/PowerShell/PowerShell/tags

选一个喜欢的版本

验证安装

电脑搜索

在 Windows 电脑搜索:PowerShell

选择这个黑色的图标,可以看到安装目录

安装在【C:\Program Files\PowerShell\7】这个目录中

查看 PowerShell 安装路径

前面已经看过了,所以看不看都行。以下两种方式都可以

复制代码
$PSHOME

(Get-Process -Id $PID).Path

查看版本信息

复制代码
$PSVersionTable
相关推荐
Vex2une7 小时前
PowerShell 发展史:从命令行外壳到跨平台自动化引擎
windows·自动化·azure·powershell·vs code·脚本语言·dsc
Vex2une2 天前
PowerShell ISE 到 VS Code 迁移史:从集成脚本环境到现代编辑器工作流
windows·vscode·powershell·powershell ise·powershell 扩展·powershell 7·脚本编辑器
Vex2une6 天前
Windows PowerShell 发展史:从命令行工具到自动化核心
windows·自动化运维·命令行·powershell·cmd·脚本语言·对象管道
iCxhust7 天前
Powershell脚本,列出近3日打开的文件夹并打开
程序人生·powershell
谷哥的小弟9 天前
基于PowerShell的Chrome无痕访问
chrome·powershell·网络环境·无痕访问
Blockbuater_drug21 天前
setx 设完读不到?Windows 系统环境变量作用域、截断坑与 AI 工具密钥管理
注册表·powershell·api key·mcp server·windows 环境变量·setx·环境变量插值
bosins1 个月前
Windows IIS 配置本地HTTPS 全流程指南:自签名证书 + 端口绑定 + 避坑详解
powershell·openssl
DogDaoDao1 个月前
Windows 开发提效工具全景指南:60+ 工具的工程化分层配置
windows·git·程序员·开发工具·powershell·everything·msys2
winfredzhang2 个月前
用 wxPython 打造「Claude Code 任务启动器」:一个把 AI CLI 变成一键工作流的桌面工具
python·wxpython·powershell·剪贴板·claudecodecli
鬼手点金2 个月前
Hermes‑Agent 使用教程
python·ubuntu·powershell·cmd·ai agent·opencode·hermes