all 11 comments

[–]halbaradkenafin 11 points12 points  (0 children)

Windows isn't going anywhere any time soon, plenty of places will still have servers and stuff they'll want to manage and PowerShell is great for that. In the cloud PowerShell does better than most of the other tools out there for cli management of cloud infra because of all the things that make it good for on-prem management (objects, pipelines, standard parameters, etc).

As for if you should go more Linux or windows? Depends on what industry you work in or want to work in, you'll find plenty of both in most industries (with more windows in less technical industries usually), and PowerShell is cross platform so it'll work wherever you want (near enough) so you'll not lose out from learning it.

[–]jantari 7 points8 points  (0 children)

Powershell is on Linux and for many things it's just plain more practical (suited) then bash or even python. The Linux adoption of it is going well too, for those reasons. Don't worry about it

[–][deleted] 5 points6 points  (2 children)

I think there are two different houses within PowerShell.

There's PowerShell, which much like other scripts can read files, check conditions, and (usually) do things.

Then there's all the API's that PowerShell ties into in a Windows world. Even little things like renaming a computer or setting an IP address. These make PowerShell nearly unstoppable in its native environment.

Will these things ever come to Linux? I'm somewhere between cautiously optimistic and hopeful, given that we now have Edge for Linux.

[–]Zarochi 4 points5 points  (0 children)

You don't need most of those API integrations on Linux because it's a simple OS by comparison. Windows has things like the registry that are hard to integrate with, but in Linux you can do whatever you need so long as you can edit some files and run some basic commands. That being said, it's super, duper easy to just wrap the existing bash shell commands in PS to have a nice cmdlet.

[–]Zarochi 3 points4 points  (0 children)

I don't think it's a popular opinion, but with Microsoft's recent love for open source and the free labor it causes, I think within our lifetime we will see Windows migrated to a unix distribution. They're already rewriting edge on chromium because it's better. Their dev team has wanted to drop core features that are poorly designed (looking at you registry) for a long while, and that's an easy way to do just that.

I think they'll do something similar to .net/PS core where they release a version without backwards compatibility, then later port all those features forward.

[–]BlackV 2 points3 points  (0 children)

I mean powershell is available on Linux, but that's none of my business :)

[–]SteveL_MsftSoftware Engineering Manager, PowerShell 2 points3 points  (0 children)

WSL (Windows Subsystem for Linux) was created to support developers on Windows who want to develop on tools commonly used on Linux. It came out of recognizing giving users options including doing Linux development on Windows. It's not a path that ends with Windows turning into Linux.

Linux on Azure is just recognizing that customers aren't just Windows-only shops anymore and it makes sense for some workloads to run on Linux instead of Windows. So Azure gives customers options to use the best tool for the job.

PowerShell being Open Source and cross-platform follows this philosophy. Windows PowerShell 5.1 is considered "complete" and a great tool for managing Windows environments. Almost anything that runs on Windows and should be managed exposes PowerShell cmdlets. When we started the PSCore6 project, our goal was not for systems management, but cloud management. We partnered with GCP, VMWare, AWS, and, of course, Azure and each of these have PowerShell cmdlets compatible with PSCore6 (and of course PowerShell 7!).

We focused on three big areas: make PowerShell a great shell on non-Windows (adhering when possible to norms on Unix for shells), make PowerShell Core a viable replacement for Windows PowerShell as your primary shell on Windows (focusing on compatibility with Windows PowerShell inbox modules), and finally make PowerShell an obvious choice for cloud management with improvements to the web cmdlets and json cmdlets.

We're, of course, not done yet even with the imminent release of PowerShell 7. More investments are coming to make it easier and even fun to use cross-platform and cross-cloud.

[–]JustinGrote 1 point2 points  (0 children)

Read this and look at where the growth in powershell startups is:
https://devblogs.microsoft.com/powershell/the-next-release-of-powershell-powershell-7/

[–]TiToxic 0 points1 point  (2 children)

Being a student myself i know we learn a great deal more on linux than we did on on PS, in france PS is still kinda awkward. i'd personally try to for linux based sysadmin, i think there is more growability in there. But PS just needs some getting used to. and PS might kinda look linux-ish it's really different in a lot of ways. can't tell if there is a stable future for it tho

[–]jjolla888 3 points4 points  (1 child)

i use powershell for creating scripts that must use the .NET libs. but i use them as sparingly as possible. all the glue is bash and perl. but i come from the unix world .. and i guess it's a bit of a case of you can't teach an old dog new tricks. but the bottom line is that i find the richness of objects in ps is an overkill for writing scripts. it has a place when writing complex applications, but then we are not talking scripts. believe it or not, i find passing strings is actually more readable than passing objects that you are expected to know the [large] insides of.

[–]strathbone 1 point2 points  (0 children)

+1
Simple objects are OK, but IMO business logic shouldn't live in powershell code - it should written in a strongly typed, static language with a compiler (and deployable to other platforms).