查看window是否安装了windows powershell
最直接的方法有两种:
- 在
cmd里执行:where powershell如果输出类似下面的路径,就说明已安装:
C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
- 查看版本:
powershell -NoProfile -Command "$PSVersionTable.PSVersion"
如果能输出版本号,就说明可正常使用。
补充一下:
powershell一般指 Windows PowerShell 5.1pwsh一般指 PowerShell 7
如果你还想一起检查“是否安装了 PowerShell 7”,可以再执行:
where pwsh

浙公网安备 33010602011771号