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
相关推荐
IOT那些事儿6 天前
Windows PowerShell配置Qt5编译运行环境
windows·powershell·qt5
今夕资源网8 天前
powershell工具包 安装升级脚本并设置UTF-8 环境快捷方式创建 将powershell的编码默认改为UTF-8
开发语言·utf-8·powershell·utf-8编码·powershell7·powershell5·设置utf-8编码
fengyehongWorld13 天前
Powershell 注册.dll类库到系统
powershell
就叫年华吧丶14 天前
Git Bash、CMD 与 PowerShell 的区别详解
linux·git·命令行·powershell·cmd·gitbash
Soari19 天前
Ziggo-CaaS-Switch软件配置教程
bash·powershell·tsn 交换机
LAM LAB25 天前
【shell】win10 Powershell字体美化
powershell
humors2211 个月前
AI工具合集,不定期更新
人工智能·windows·ai·工具·powershell·deepseek
fengyehongWorld1 个月前
Powershell 自动安装Excel自定义标签页,开启宏
powershell
西西弗Sisyphus1 个月前
PowerShell 配置为启动时自动激活 Conda 环境
conda·powershell
夫唯不争,故无尤也2 个月前
curl与Invoke-RestMethod核心区别
后端·fastapi·powershell·curl