Windows系统如何下载使用powershell 7

介绍:

微软在2020年3月10日推出了powershell 7,使用powershell 5 的时候,上面有一行字:“Try the new cross-platform PowerShell https://aka.ms/pscore6
我就按照链接上面的步骤实现的windows中在powershell5下对powersehll7的安装。

powershell7在windows termail中下载的界面


windows下的安装步骤:

复制段代码,粘贴并在shell中运行:

iex "& { $(irm https://aka.ms/install-powershell.ps1) } -UseMSI"下载msi文件直接安装。

screenshot
接下来,会弹出这样的画面。(可能需要慢一些才能出来),点击下一步…直到完成即可。
或者直接访问“https://github.com/PowerShell/PowerShell/releases/download/v7.1.3/PowerShell-7.1.3-win-x86.msi
在这里插入图片描述

升级 POWERSHELLGET 和PACKAGEMANAGEMENT:

打开在搜索中输入:powershell7,右键点击,选择以管理员模式运行,并依次执行以下代码:

Install-Module –Name PowerShellGet –Force
Set-ExecutionPolicy RemoteSigned
Install-Module –Name PowerShellGet –Force -AllowClobber
Update-Module -Name PowerShellGet

powershell4
我已经下载完成了,所以执行之后的结果与第一次运行不一样~

在Windows 商店中下载windows Terminal(preview):

下载完成后,可在其中运行多窗口,非常人性化~
并且可以在其中打开不同的shell(甚至Ubuntu的shell也可以)
在这里插入图片描述

引用:

https://docs.microsoft.com/en-us/powershell/scripting/install/installing-powershell-core-on-windows?WT.mc_id=THOMASMAURER-blog-thmaure&view=powershell-7

  • 2
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 4
    评论
v7.0.0-preview.4 - 09/19/2019 Engine Updates and Fixes Add support to ActionPreference.Break to break into debugger when Debug, Error, Information, Progress, Verbose or Warning messages are generated (#8205) (Thanks @KirkMunro!) Enable starting control panel add-ins within PowerShell Core without specifying .CPL extension. (#9828) Performance Make ForEach-Object faster for its commonly used scenarios (#10454) and fix ForEach-Object -Parallel performance problem with many runspaces (#10455) Experimental Features Update PSDesiredStateConfiguration module version to 2.0.3 and bring new tests; enable compilation to MOF on non-Windows and use of Invoke-DSCResource without LCM (#10516) Add APIs for breakpoint management in runspaces and enable attach to process without BreakAll for PowerShell Editor Services (#10338) (Thanks @KirkMunro!) Support ternary operator in PowerShell language (#10367) General Cmdlet Updates and Fixes Add PowerShell Core group policy definitions (#10468) Update console host to support XTPUSHSGR/XTPOPSGR VT control sequences that are used in composability scenarios. (#10208) Add WorkingDirectory parameter to Start-Job (#10324) (Thanks @davinci26!) Remove the event handler that was causing breakpoint changes to be erroneously replicated to the host runspace debugger (#10503) (Thanks @KirkMunro!) Replace api-ms-win-core-job-12-1-0.dll with Kernell32.dll in Microsoft.PowerShell.Commands.NativeMethods P/Invoke API(#10417) (Thanks @iSazonov!) Fix wrong output for New-Service in variable assignment and -OutVariable (#10444) (Thanks @kvprasoon!) Fix global tool issues around exit code, command line parameters and path with spaces (#10461) Fix recursion into OneDrive - change FindFirstFileEx() to use SafeFindHandle type (#10405) Skip auto-loading PSReadLine on Windows if the NVDA screen reader is active (#10385) Increase built-with-PowerShell module versions to 7.0.0.0 (#10356) Add throwing an error in Add-Type if a type with the same name already exists (#9609) (Thanks @iSazonov!)
评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值