r/PowerShell • Program Manager, PowerShell • Jan 10 '18

PowerShell Core 6.0: Generally Available (GA) and Supported!

https://blogs.msdn.microsoft.com/powershell/2018/01/10/powershell-core-6-0-generally-available-ga-and-supported/
189 Upvotes

45 comments sorted by

29

u/markekraus Community Blogger Jan 10 '18

/u/joeyaiello and /u/stevel_msft Please pass on my gratitude and congratulations to your team! You guys did an excellent job with this and your hard work deserves mentioning.

I was initially skeptical that PS Core would ever truly be a community project, but after working with the PowerShell Team and other community contributors for the past 6 months, I'm confident it is a true collaboration between the community and Microsoft. Just look at all the community contributions on the that page!!

I'm really excited about the future of PowerShell! v6.0.0 is only the beginning and it is a tremendous first step.

God job guys!

4

u/Swarfega Jan 11 '18 edited Jan 11 '18

I know there was a lot of involvement from the community, including yourself /u/markekraus, in reaching this milestone. I guess a special thanks to MS for making it open source.

I'm no programmer so couldn't really get involved with contributing but after looking around other areas I managed to make a few changes to DSC documents and help docs leading to me somehow ending up 4th on the PRs list.

Anyway congrats on being in the top 4 on all lists!

2

u/markekraus Community Blogger Jan 11 '18

Technically, I'm in the top 3 for all categories. saldana shouldn't really count because her bot comments on every commit on every PR to PowerShell-Docs. ;-P

3

u/fourierswager Jan 11 '18

Well...that's not top 2 for all categories...so, pffff, whatever man /jealousy

3

u/thepeque Jan 11 '18

Thank you! It means a lot to us that this release was done in collaboration with the community / cheers

19

u/Henry_Horsecock Jan 11 '18 edited Jan 11 '18

It's all good and well to say you don't need to migrate existing code, but how many will want to stay on a platform that will have no future updates? And how many will want to work with both editions, swapping back and forth depending on the script. It reminds me of the Python 2/3 mess - some libraries only support 2, some only support 3, have fun if you need both in the same script.

I've just installed core, it looks like Test-NetConnection is missing, and find-module doesn't find "nettcpip" (is it called something else?). Is there a full list of default cmdlets which are in 5.1 but not in Core? I've seen the 'breaking changes' page, but I'm looking for a full list if there is one.

The VSCode PowerShell extension has no mention of core, and I can't set PowerShell Core as a language (for the purpose of running/debugging using pwsh.exe instead of powershell.exe). Any idea if this will be updated in the extension?

4

u/Thotaz Jan 11 '18

VS code supports powershell core just fine, I never have to do anything special to add it, it's just automatically detected for me. Are you clicking on the version icon in the bottom right corner? https://i.imgur.com/CVliI6q.png

I can understand the frustration in juggling 2 different versions, but at least it's pretty easy to import and export objects between the 2 versions, for example if you want to run test-netconnection from powershell core you just need to type in:

$TestResult=&powershell -noprofile -command {test-netconnection 8.8.8.8} -outputformat XML

and it will give you (almost) the exact same result as it would in Windows powershell. (I say almost because some of the fancy stuff is lost, like the enumerator for the prefixorigin under $TestResult.SourceAddress.PrefixOrigin where it gives me an int value of 3, instead of the "translated" value of DHCP.)

2

u/Henry_Horsecock Jan 12 '18

Mine hasn't got the the option for Core, all good though, glad it's supported, just means I need to fix my end.

Interesting way to get access to old commands, didn't think of that. Still, not something I'd want to do in production code.

7

u/KevMar Community Blogger Jan 11 '18

This will make things better for us in the long run. We already had fragmentation where PowerShell 5.0 had different cmdlets on win7, win8 and win10. This is the first time we lost cmdlets with a new version but the intent is that these belong in external modules and not shipped with PowerShell.

As far as the language, we didn't see a lot of changes so we should see a high degree of compatibility between 5 and 6. I was more concerned when 5 was released because they added classes/enums and I thought we would see a much larger fragmentation because of it than we did.

This time around I am predicting the fragmentation will come from scripts that interact with RestAPIs. With that said, there will be a lot of remote administration scripts that are not using CIM or PSSessions that will not work in PS 6.0.

2

u/Henry_Horsecock Jan 12 '18

This is the first time we lost cmdlets with a new version but the intent is that these belong in external modules and not shipped with PowerShell.

I really hope we don't get the same mess with modules that javascript/npm has. I liked that I could do 90% of what I needed with built-in commands which I knew I could trust, which I knew wouldn't get abandoned when the developer stopped giving a shit, or sold to some malicious third party as has become popular with Chrome extensions. I can foresee the frustration with third party modules, half of which work on one OS but not another for whatever obscure technical reason (this is pretty common with Python, especially with network related libraries).

I hope it makes thing better in the end, perhaps I'm too pessimistic, but having gone through the Python 2/3 mess, and seeing what a clusterfuck npm has become with JS developers downloading >100MB of dependencies for a "hello world", I think we'll lose a lot of stability/reliability and probably security in the process.

0

u/[deleted] Jan 11 '18

[deleted]

4

u/KevMar Community Blogger Jan 11 '18

We just have to give it time. https://richardspowershellblog.wordpress.com/2018/01/04/windows-compatibility-pack/amp/?__twitter_impression=true

5.1 will hang around for quite a while. They don't even have DSC support in 6.0 yet.

So the early adopters will be on the front lines sorting this out. I think we will see a lot of changes before we see this on windows updates or replacing 5.1

3

u/[deleted] Jan 11 '18

Give it time. v6 was just released to GA less than 24 hours ago, you can't expect many modules to be outright available for v6.

3

u/halbaradkenafin Jan 11 '18

Vscode should pick up PS Core after a restart or two, it took a little while for mine to do that but it does show up as an option when starting a new PS integrated console. You'll probably have to use the command pallette to create the session.

2

u/cyp3d Jan 11 '18

maybe you can get-command | export-csv on both and compare?

-1

u/[deleted] Jan 11 '18

Yeah I probably won’t get around to this until 2024. I really, really hate when Microsoft does one of these ground-up rewrites.

6

u/pcgeek86 Jan 10 '18

Great work! I've been looking forward to this since August 18th, 2016! :) https://channel9.msdn.com/Shows/msftazure/Run-PowerShell-Natively-on-Linux-with-Docker

4

u/GavinEke Jan 10 '18

Yay Awesome work PS Team and all contributors.

3

u/agressiv Jan 12 '18

While I have no problem still doing admin stuff in Windows Powershell, I'll need a good set of GUI tools in order to actually use Powershell Core out in the real world on end-user devices and servers.

We use Windows Forms extensively along with XAML in Powershell, and quite a few .NET libraries that don't exist in core.

For now, this is way more important than cross-platform support. I have no problems using something else and re-writing code, but you have to at least be able to technically do something using the new technology. Changing those forms to pure C# probably won't happen or trying to do both Core and Desktop versions would be clunky at best - it would be change for the sake of change.

2

u/Clebam Jan 11 '18

It might be a stupid question, but is the a PS Core 6.0 ISE Editor ?

4

u/KnifeyGavin Jan 11 '18

Yes its just now called VSCode.

3

u/Clebam Jan 11 '18

Ok, I use it too, I was just wondering if there was a PS ISE.

Thanks

0

u/[deleted] Jan 11 '18

[deleted]

2

u/halbaradkenafin Jan 11 '18

Chocolatey solves that for you, just add it to your provisioning script (good) or your DSC config (better) and you'll get the latest version at deployment time.

2

u/chispitothebum Jan 11 '18

Do you really need to edit code on that many production servers?

0

u/[deleted] Jan 11 '18

[deleted]

3

u/jantari Jan 11 '18

Import-PSSession works fine for us when interacting with the EMS

2

u/Pistachiosunset Jan 11 '18

I've always been curious on powershell but only ever used vba. How different is it?

6

u/Sandman0 Jan 11 '18

Very. Some of what you know will translate over, but for the most part PowerShell is a much cleaner animal.

PowerShell is an absolute godsend in a Windows environment, especially for an admin.

Start playing with it, you’ll fall in love once you start figuring out how easy it is to do things that took hundreds of lines of code in VB.

2

u/[deleted] Jan 12 '18

Night and day. I have never contemplated the pros/cons of throwing myself off a bridge while using powershell. I can't say the same for VBS...

1

u/[deleted] Jan 12 '18

How are you in 2018 but never used Powershell?!?!

5

u/[deleted] Jan 10 '18

AS someone who loves powershell but hasn't been following closely, does this mean i have to start changing all my scripts to Core? Cause I've got scripts that go back to Powershell V1 that do all kinds of things, and many of them do WMI stuff and use snap ins. Is this the MS habit of taking something awesome and starting over again?

8

u/pcgeek86 Jan 10 '18

Great question!

There is quite a bit of functionality that's specific to the Microsoft Windows platform, that you'll need to continue to do in Windows PowerShell. For example, if you're using PowerShell Remoting via WinRM + Kerberos + TLS, or WMI as you indicated, you'll want to keep using Windows PowerShell.

On a positive note, you can run Windows PowerShell inside of Windows Containers, so you can easily scale out your PowerShell worker processes!

-3

u/Thotaz Jan 10 '18

Windows powershell 5.1 will continue to be supported. Powershell 6 doesn't replace it if you install it, it will be side by side with Windows powershell.

So no, you don't have to start changing your old scripts because they are all targeting Windows machines and Windows powershell isn't being removed or changed in anyway by this.

For any new scripts you write, it's a good idea to consider using the newer features that work in both powershell, and Windows powershell, but you aren't forced to do it.

PS. This is pretty obvious if you read the link the OP linked to, what exactly are you gaining by asking the question here and reading responses when you could get the same info just by reading the original post?

12

u/jashley92 Jan 11 '18

You had a really good post going until you mucked it up with that PS section.

4

u/Thotaz Jan 11 '18

I just don't get why someone would open up a FAQ and ask about a question that has already been answered in the FAQ. I could understand it if the FAQ was very long and hard to navigate, or if the answer was a bit unclear, but it's a short FAQ and the answer is crystal clear:

Does PowerShell Core affect my Windows PowerShell installation?

Nope!...

5

u/Already__Taken Jan 11 '18

If we were going to read the article we wouldn't be on reddit would we now.

2

u/Lee_Dailey [grin] Jan 11 '18

howdy Already__Taken,

that sounds like a classic slashdot comment ... [grin]

take care,
lee

3

u/myworkaccount999 Jan 11 '18

what exactly are you gaining by asking the question here and reading responses when you could get the same info just by reading the original post?

An answer. Hey, look! You answered. /u/el_covfefe accomplished their goal. This is pretty obvious.

1

u/Thotaz Jan 11 '18

But he already had the answer and the question inside the FAQ in crystal clear text, why not simply click on the link and scan through it for his question? It would be faster and take less effort from his side.

2

u/[deleted] Jan 11 '18

[removed] — view removed comment

1

u/Thotaz Jan 11 '18

Me being helpful, then realizing that there was no point in trying to help him, and then I left a snarky remark. Clearly that wasn't a popular decision, but I hope he will remember this the next time he tries to be lazy.

1

u/[deleted] Jan 12 '18

[removed] — view removed comment

2

u/Thotaz Jan 12 '18

What do I gain from any other comment on reddit? 99% of the time it gives me nothing, the only time I gain anything is if someone answers a question for me, or if they respond with some sort of improvement to the way I do something (more optimized way to do something or whatever).

1

u/Thotaz Jan 12 '18

What do I gain from any other comment on reddit? 99% of the time it gives me nothing, the only time I gain anything is if someone answers a question for me, or if they respond with some sort of improvement to the way I do something (more optimized way to do something or whatever).

3

u/halr9000 Jan 11 '18

Very excited. Love the & job support!

P.S. Hey Joey, long time, great release!

1

u/ekdn Jan 11 '18

This is good news, will have a play tomorrow. What is the replacement for workflows in pscore?

1

u/Stoffel_1982 Jan 11 '18

This will make linux systems more accessible for me. Just installed it on my 2 centos boxes.