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 launches as a snap
About The Author
Follow me on Twitter @thomholwerda
2018-07-24 8:11 amLobotomik
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.
2018-07-24 1:42 pmabubasim
Yes, Bash syntax is bonkers, not quite Perl but almost a read-only language.
Maybe you meant write-only.
2018-07-24 8:27 amsimon_edwards
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.
2018-07-24 6:16 pmDrumhellar
Ever wanted something like Bash [/q]
Use tcsh, korn, or one of several others. Powershell is completely unlike bash.
but with incredibly verbose (but still hard to remember) command names
i.e. human readable, and without the need to write a bunch of sed/grep/awk commands to extract needed text from the output of various differing commands,
apt-get install powershell installs 6 packages on a clean Debian install, once Microsoft’s repo is added.
extremely slow execution
You finally go one right! Powershell is slow. However, I’d hope you aren’t relying on bash speed for performance-sensitive operations.
[q]and case insensitivity
or case sensitivity, if you prefer. Powershell handles both.
2018-07-24 7:51 pmFlyingJester
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.
2018-07-25 2:09 amFlatland_Spider
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?
2018-07-23 9:07 pmleech
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.
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.
2018-07-24 3:29 amAnonymous
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.
2018-07-25 2:28 amFlatland_Spider
Good god. Windows admins are out there molesting Linux boxes. 8| Someone… do… something.
2018-07-25 8:12 amavgalen
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.
2018-07-25 2:25 amFlatland_Spider
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.
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?