Announcing PowerShell on Linux - PowerShell is Open Source!
I started doing PowerShell almost 10 years ago. Check out this video from 2007 of me learning about PowerShell from Jeffrey Snover! I worked in PowerShell for many years and blogged extensively, ultimately using PowerShell to script the automation and creation of a number of large systems in Retail Online Banks around the world.
Fast forward to today and Microsoft is announcing PowerShell on Linux powered by .NET Core and it's all open source and hosted at http://GitHub.com/PowerShell/PowerShell.
Jeffrey Snover predicted internally in 2014 that PowerShell would eventually be open sourced but it was the advent of .NET Core and getting .NET Core working on multiple Linux distros that kickstarted the process. If you were paying attention it's possible you could have predicted this move yourself. Parts of PowerShell have been showing up as open source:
Get PowerShell everywhere
Ok, but where do you GET IT? http://microsoft.com/powershell is the homepage for PowerShell and everything can be found starting from there.
The PowerShell open source project is at https://github.com/PowerShell/PowerShell and there are alphas for Ubuntu 14.04/16.04, CentOS 7.1, and Mac OS X 10.11.
To be clear, I'm told this is are alpha quality builds as work continues with community support. An official Microsoft-supported "release" will come sometime later.
What's Possible?
This is my opinion and somewhat educated speculation, but it seems to me that they want to make it so you can manage anything from anywhere. Maybe you're a Unix person who has some Windows machines (either local or in Azure) that you need to manage. You can use PowerShell from Linux to do that. Maybe you've got some bash scripts at your company AND some PowerShell scripts. Use them both, interchangeably.
If you know PowerShell, you'll be able to use those skills on Linux as well. If you manage a hybrid environment, PowerShell isn't a replacement for bash but rather another tool in your toolkit. There are lots of shells (not just bash, zsh, but also ruby, python, etc) in the *nix world so PowerShell will be in excellent company.
Related Links
Be sure to check out the coverage from around the web and lots of blog posts from different perspectives!
- PowerShell Team Blog
- PowerShell Webinar
- PowerShell Team YouTube official channel
- GitHub PowerShell Project
- .NET Core Project
Have fun! This open source thing is kind of catching on at Microsoft isn't it?
Sponsor: Do you deploy the same application multiple times for each of your end customers? The team at Octopus have been trying to take the pain out of multi-tenant deployments. Check out their 3.4 beta release.
About Scott
Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.
About Newsletter
Maybe for cross compatibility sake ?
But the most important thing here for me is open sourcing Powershell. If Microsoft didn't prepare a version that runs on Linux, someone other geek would probably do it sooner or later (it's worth mentioning that there already exists an open source effort to reimplement Powershell: Pash.
Here's what I did, hoping it would work...
--Installed PowerShell using .pkg installer on OS X
--Opened a terminal and entered "powershel"
--Typed "Install-Package -ListAvailable", which was suggested as something you could do with the Package Manager Console here: https://docs.nuget.org/consume/package-manager-console
--Got this error:
Get-Package : A parameter cannot be found that matches parameter name 'ListAvailable'.
So it looks like the Get-Package command is something that PowerShell recognizes, but it doesn't behave the same way as it does in the VS Package Manager Console?
Is this something I can eventually expect to work? Is there something obvious I'm overlooking about how to make it work?
And as open SSH is getting native support in powershell too i truly can have one shell to rule them all. With a bit of thought i should be able to unify my bash and ps library into a single set of CmdLets which can then be automated via systems centre etc..
Some of the things that Scott hasnt mentioned here are the PS Linux CmdLets things like to add a new cron job, rather than firing up vi/vim/emacs/nano and counting comma's then finding you have a syntax error after all the cmdlet wraps it all up for you, yes i can do that in bash, but if i can just invoke the command via ssh from my desktop that will be a real time saver along with tab completing the command. While bash is great and all, for me its much like Java circa 2000 its showing its age, there are too many ways of doing the same thing, and what started with good ideals has degenerated into who can do the most operations with the most convoluted {[]}{()} syntax going, besides as its linux you can run what ever shell you like, just happen to like powershell the most at the moment :)
Now if only the default windows powershell CLI was tabbed like SuperPutty....
PowerShell nuget package manager (the one from Visual Studio) has cmdlet's name collisions with PowerShellGet (PS package manager), which you run in PowerShell on OS X. They essentially provide the same functionality for different scopes (project vs the whole system), but available parameters are different. It's indeed confusing, we are sorry.
PowerShell project uses github issues. Please, feel free to open new issues on https://github.com/PowerShell/PowerShell/issues and ask any questions or propositions. It's the best place for such discussions.
We are very much appreciate feedback!
-Sergei
PowerShell team
Thanks for the response! I'll check out the GitHub repo and continue the conversation there.
Do you have any idea how we will get a grasp on system information?
Also, I have summarized everything that has been said, the various blog posts etc.. and regularly update the page with all the Powershell open source information here --> http://powershelldistrict.com/powershell-linux/
Comments are closed.
powershell first appeared November 14, 2006; 9 years ago according to wikipedia. https://en.wikipedia.org/wiki/Windows_PowerShell