Microsoft PowerShell Core For Linux Now Available as a Snap (betanews.com)
Canonical announced on Friday that Microsoft's PowerShell Core is now available on Linux platform as a Snap. From a report: If you aren't familiar, a Snap is essentially a packaged version of a program that can be easily installed on many Linux distributions. Many see it as the future of Linux, as it has the potential to reduce fragmentation. "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," says Canonical.
A piece of software that fills out a much-needed gap in the Linux world. Thanks, MIcrosoft; we could not expect any less from you.
Why, oh why, would I install something that is: .NET .NET to exist in my system in the first place?
- slow
- bloated
- in all likelihood harvesting data behind your back
- trying to replace something which isn't broken (a Linux terminal)
- dependent on
on my machine? {deity_of_choice}, why would I even permit
So you are proposing that the best solution is to bundle all your dependencies into a single package with your target program and avoid getting the security updates that the distro provides for those dependencies. A snap requires that the user trust _each_ snap provider to update their snap for every fix to every dependency.
Can you install the VMWare cmdlets on it, or otherwise import them for use?
/|\ Hey, I think I found Lennart Poettering!
Confucius say, "Find worm in apple - bad. Find half a worm - worse."
I installed this Wednesday to check out a challenge someone posted in a forum.
The challenge was to implement the following powershell script using bash:
param(
[Parameter(Mandatory=$True)]
[datetime]$FromDate,
[Parameter(Mandatory=$True)]
[datetime]$ToDate,
[Parameter(Mandatory=$False)]
[ValidateScript({Test-Path -PathType Container $_ })]
[string]$Directory = '.'
)
Get-ChildItem -Include '*.JPG','*.PNG' -Recurse -Path $Directory | Where-Object { $_.CreationTimeUtc -ge $FromDate -and $_.CreationTimeUtc -le $ToDate } | ForEach-Object { $_.FullName }
The challenge author also specified that the bash script should match the functionality of the above including:
Code:
Get-Help
test.ps1 [-FromDate] [-ToDate] [[-Directory] ] []
My first thought was, "I can get a bash script to run on any version of Windows and have been happily using bash and tcsh on Windows since Windows 95 in the 90s. Can that Powershell script run on Linux?" Surprisingly, I installed the powershell core snap, copied the script to test.ps1, and ran it with no issues. It doesn't convert me to powershell, but I was surprised the argument didn't hold.
Snap ... Many see it as the future of Linux, ...
And many don't. (but they did, back in the 1980s when static-linking was all the rage)
PowerShell ... is designed specifically for system administrators and power-users to rapidly automate the administration of multiple operating systems ...
Meaning: Windows, Windows Server ...
It must have been something you assimilated. . . .
To elaborate on that last point: being dependent on works under the "Microsoft Patent Promise for .NET Libraries and Runtime Components" is considerably dangerous because of the profound limits for software reuse and modification, and because of how limited this "patent promise" is. You cannot deal in the "Microsoft Patent Promise for .NET Libraries and Runtime Components" covered software as you can with free software (which is so named because it respects a user's freedoms to run, inspect, share, and modify the software) under, say, the GNU General Public License version 3 (GPLv3). Here are a few highlights from that article:
That's a huge danger, particularly to anyone used to working in free software where merging code between compatibly-licensed programs is the norm. Your interests as a user (regardless of your technical skill or willingness to learn technical skills) is far better served by the GPLv3 (also covered at the aforementioned article). The GPLv3 is simply far more straightforward and clear about your permissions, and the GPLv3 grants you what you need to deal fully in the software respecting your software freedom the whole time.
Digital Citizen
Explain then how to automate a few tasks on 100 Linux servers some on premise and some in the cloud without having to log into each one?
Since Powershell is object based you can do more with a for each statement for 100 servers and use custom apis to work the magic without an expensive 3rd party tool. You can do a PSremote session if you want too or just use Azure RM or snmp without having to touch each server.
http://saveie6.com/