PowerShell Core 6.2 发布,侧重于性能改进

栏目: 编程工具 · 发布时间: 6年前

内容简介:有关 PowerShell Core 6.2 的安装信息,请查看另外,PowerShell Core 与 Windows PowerShell 可同时运行,两者能够彼此独立使用。这就意味着我们可以继续将 Windows PowerShell 用于现有脚本,同时使用 PowerShell Core 实现新的自动化或探索其新功能。

PowerShell Core 6.2 GA 已发布 ,PowerShell Core 是 PowerShell 的开源版本,适用于 Linux,macOS 和 Windows。

有关 PowerShell Core 6.2 的安装信息,请查看 安装文档

另外,PowerShell Core 与 Windows PowerShell 可同时运行,两者能够彼此独立使用。这就意味着我们可以继续将 Windows PowerShell 用于现有脚本,同时使用 PowerShell Core 实现新的自动化或探索其新功能。

更新内容

自 6.1.0 发布(2018 年 9 月)以来,开发团队已经对 6.2 版本进行了 560 次更改, 具体的变更详情请点此查看 。PowerShell Core 6.2 版本主要侧重于性能改进、错误修复以及可提高用户生活质量的较小 命令行(cmdlet)/语言增强功能。

实验性功能

未找到命令时的建议

Enable-ExperimentalFeature -Name PSCommandNotFoundSuggestion

当用户输入命令行时,如果出现拼写错误的情况,此功能将使用模糊匹配来查找使用者 可能打算输入的命令,并提供建议。

PS> Get-Commnd
Get-Commnd : The term 'Get-Commnd' is not recognized as the name of a cmdlet, function, script file, or operable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ Get-Commnd
+ ~~~~~~~~~~
+ CategoryInfo          : ObjectNotFound: (Get-Commnd:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
 
 
Suggestion [4,General]: The most similar commands are: Get-Command, Get-Content, Get-Job, Get-Module, Get-Event, Get-Host, Get-Member, Get-Item, Set-Co

上面的这个例子中,使用者拼写错了 Get-Command 并且模糊地匹配了很多最可能、以及最不可能的建议。

隐式远程批处理

Enable-ExperimentalFeature -Name PSImplicitRemotingBatching

在管道中使用 隐式远程处理 时,PowerShell 会独立处理管道中的每个命令。这导致在

管道的执行过程中反复地在客户端和目标系统之间对对象进行序列化和反序列化。

若应用此特性,PowerShell 会分析管道并确定命令是否可以安全运行,或者命令是否存在于目标系统上,并且能够远程执行整个管道,最后只将结果序列化和反序列化回客户端。

详情请查看发布公告


以上所述就是小编给大家介绍的《PowerShell Core 6.2 发布,侧重于性能改进》,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对 码农网 的支持!

查看所有标签

猜你喜欢:

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

Persuasive Technology

Persuasive Technology

B.J. Fogg / Morgan Kaufmann / 2002-12 / USD 39.95

Can computers change what you think and do? Can they motivate you to stop smoking, persuade you to buy insurance, or convince you to join the Army? "Yes, they can," says Dr. B.J. Fogg, directo......一起来看看 《Persuasive Technology》 这本书的介绍吧!

MD5 加密
MD5 加密

MD5 加密工具

SHA 加密
SHA 加密

SHA 加密工具