在2018年初,微软终于正式发布了PowerShell Core 6.0。可以说PowerShell Core 6.0是全新的PowerShell版本,用官方的话来说它不同以往因为它是建立在跨平台(支持Windows, macOS, Linux),开源并且为异构环境和混合云而生。
我相信不少人肯定会有点分不清最早我们用的PowerShell和这个PowerShell Core 6.0有什么区别,是不是所谓的6.0就是之前PowerShell的新版本,其实还真是有区别的,两者不一样。以前我们在Windows用的PowerShell,我们称为Windows PowerShell,而今天说的这个是PowerShell Core 6.0(没错,一发行,微软就给它搞了一个6.0命名而不是Core 1.0)。其实也意味着 PowerShell 现在已经分了两大版本系列,基于.NET Framework的Windows PowerShell和基于.NET Core的 PowerShell Core,就微软目前的动向来看,这两个版本将会并行工作。
那Windows PowerShell与PowerShell Core 6.0又有什么区别呢,主要几个区别如下:
- 顾名思义,Windows PowerShell是基于.NET Framework的,所以它也只能在Windows中使用。
- PowerShell Core 6.0发布时,Windows PowerShell 最新的版本在5.*,但PowerShell Core 6.0 可不是Windows PowerShell的升级版本。
- PowerShell Core 6.0因为它的跨平台,自然不仅