PowerShell Core from Microsoft is now available for Linux as a Snap. Built on the .NET Framework, PowerShell is an open source task-based command-line shell and scripting language with the goal of being the ubiquitous language for managing hybrid cloud assets. It is designed specifically for system administrators and power-users to rapidly automate the administration of multiple operating systems and the processes related to the applications that run on those operating systems.
Powershell: Ever wanted something like Bash, but with incredibly verbose (but still hard to remember) command names, epic dependencies, extremely slow execution, and case insensitivity?
Yes, Bash syntax is bonkers, not quite Perl but almost a read-only language. DOS-batch is much worse, though, if you try to do anything beyond the simplest three liner. Powershell, I just cannot wrap my mind around it; I have not devoted much time to it, but it feels like something wordy and convoluted to which there is no simple approach.
I just wish the bash shell for windows were better integrated, something like Cygwin but better. Some magic added to slashes and .exe extensions, and drive and path mappings… A better ability to launch Windows programs. I don’t need another job processing language — bash is already bad enough.
Maybe you meant write-only.
PowerShell is firstly a really good scripting language for admin type tasks. It’s secondary design goal is being an interactive shell. That is my impression from learning a bit about it.
bash is a meh interactive shell, and a horrific scripting language. fish is a much better interactive shell and better scripting language than bash, but it is no where as powerful as PowerShell.
or case sensitivity, if you prefer. Powershell handles both.
Just because names are long doesn’t make them memorable. Powershell suffers many of the same issues as bash and an associated unix userland (hard to remember command names, option names, and sometimes differing options between similar commands), but it adds very long option and command names on top of it. If I have to look something up every time I use it, and the name is non-obvious, shorter is probably better.
Just because a task isn’t performance critical doesn’t mean that literally any execution speed is acceptable.
I recently converted a build script that bin-to-c’ed some files from Powershell to Python, and the performance was almost four times the Powershell version without even trying to write clever or optimized Python.
I’d also argue that requiring .NET is a pretty epic requirement of a shell.
I always feel people’s time would be better spent writing C# then messing around with Powershell. Powershell could be cool, the idea is cool, but it’s just so obtuse.
Of course, it doesn’t take much to get me to switch to Perl or Python over Shell.
I understand that Snaps are cool because they are self contained, but I swear huge swaths of memory are being eaten away because I need to have a snap for every app. I know its only a couple megabytes, but when I run DF, and 30+ /snap/… entries, it just sets off alarms in my head. Am I being too picky about that?
I just finished removing snap from my Ubuntu install.
You remove it and it removes the ubuntu-software package, and even the standard gnome-software package has a recommend for it vs the Debian version.
https://packages.debian.org/sid/gnome-software
https://packages.ubuntu.com/bionic/gnome-software
That’s pretty scummy.
That’s probably what MS wants to achieve. To get independent progammers start porting PS command libraries to Linux with (semi) compatible API.
Given that bash on windows is rather odd and not well integrated maybe that would be the route to have one common scripting language. But that’s a long way.
Or, you have admins who have a body of PowerShell scripts that they use to admin their windows boxes and would like to use the same scripting system for their linux boxes as well.
Good god. Windows admins are out there molesting Linux boxes. 8| Someone… do… something.
When I was a SCO Unix admin I wanted some tools to be available on Windows. I used to have a “unix-tools-folder”, but recently Microsoft made this easy with WSL.
Now that I am doing mostly Windows work I would like some Windows tools to be available on Linux. Again it is Microsoft that is making this easy with .NET Core and now PowerShell.
I never lived in a time where you could only use 1 platform, but today this is becoming more and more the norm.
When I had to deal with Windows boxes, I really wanted the admin libs ported to .NET Core, so I wouldn’t have to leave Linux. Now, I’ve switched jobs, and don’t care about it, except that I need to write some code snippets for Powershell. :\
This is mainly about Azure, and how MS makes more money off of being a cloud provider then they do selling Windows licenses. Basically, they don’t care what the OS is as long as people rent servers from them.
This is also about C#/ASP.NET on Linux. .NET Core on Linux just happens to benefit people who like PS since PS is mainly C#.
Basically its the best argument for powershell. All commands can be automatically and securely logged to an audit trail. Specific commands can be black listed, yadda yadda yadda. All things that make security guys happy, but not anyone who actually has to use it. I get it, its important. But its kind of like trying to sell me on a sports car by talking about the airbags, the speed limiter, and the insurance company monitoring device to lower costs.