PowerShell ISE:如何运行新的PowerShell版本 [英] PowerShell ISE: how to run new PowerShell version

查看:204
本文介绍了PowerShell ISE:如何运行新的PowerShell版本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何使PowerShell ISE与PowerShell 6.0一起使用.当前版本为4.0.

How can I get PowerShell ISE to work with PowerShell 6.0. Currently, it has 4.0.

此服务器已安装PowerShell 4.0,并且我通过以下链接通过PowerShell-6.1.0-win-x64.msi安装了PowerShell 6.0: https://github.com/PowerShell/PowerShell/releases 这些文件现在位于C:\ Program Files \ PowerShell \ 6中.

This server has PowerShell 4.0 installed and I installed PowerShell 6.0 with PowerShell-6.1.0-win-x64.msi from this link: https://github.com/PowerShell/PowerShell/releases The files now exist in C:\Program Files\PowerShell\6.

但是,ISE仍然显示4.0,但是我需要它运行6.0

However, ISE still shows 4.0, but I need it to run 6.0

$ PSVersionTable.psversion

$PSVersionTable.psversion

重大次要版本修订

4 0 -1 -1

4 0 -1 -1

推荐答案

PowerShell具有3个可执行文件...

PowerShell has 3 executables...

仅Windows ...

Windows only...

  • PowerShell_ISE.exe = ISE v2-v5.1
  • powershell.exe = consolehost v1-5.1

注意:(没有新版本发布,但是根据Microsoft的公告,将支持今天的版本,没有新内容.仅是错误/安全修复程序.)

Note: (there are no new versions coming, but this will be supported going forward as it is today, as per Microsoft announcements, just nothing new coming to it. Just bug /security fixes.)

跨平台

  • pwsh.exe = PowerShell Core/v6

如果使用的是v6,则要使用的编辑器是Visual Studio Code,它也是跨平台的,与ISE不同.

The editor to use if you are using v6 is Visual Studio Code, which is also cross-platform, unlike the ISE.

https://code.visualstudio.com/Download

尚无计划利用ISE利用pwsh.exe/PSCore.

The are no plans to make the ISE leverage pwsh.exe/PSCore.

但是,您可以继续使用ISE,并且如果需要专门利用PSCore的功能,则必须像对cmd.exe一样使用它.您的代码将运行pwsh.exe控制台,并根据您对它的外壳方式使您返回ISE.

However, you can continue to use the ISE, and if you need something specifically to leverage PSCore, you have to shell out to it just as you would to cmd.exe. Your code will run the pwsh.exe console, and return you back to the ISE, depending on how you shell out to it.

这篇关于PowerShell ISE:如何运行新的PowerShell版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆