Windows PowerShell is now “PowerShell”: An Open Source Project with Linux support – How did we do it?

PowerShell Team

August 17th, 2016

Hello everyone,

My name is Angel Calvo, I am Microsoft’s Group Software Engineering Manager for PowerShell and Desired State Configuration (DSC). I’d like to take this opportunity to proudly represent the engineering team behind this project, and share a few thoughts about yesterday’s historic announcement for PowerShell and our Community

I am so excited about the availability of PowerShell on Linux and as an open source project! https://GitHub.com/PowerShell/PowerShell — I can’t think of a better way to celebrate the 10th year anniversary of PowerShell than by enabling everyone on the planet to help innovate and drive the future of PowerShell together!

I remember when back in 2014, Jeffrey Snover (Microsoft Technical Fellow and PowerShell inventor) and I had a discussion about his prediction to open source PowerShell, and the importance of delivering a Linux version. We realized the future of PowerShell would depend on it, and listening to our customers’ and partners’ feedback further confirmed our realization. Based on this evidence, we worked with the PowerShell team to transform our customers’ feedback data, and Jeffrey’s prediction, into a real plan and agreed on the following goals:

Enable the Community to directly participate in defining the future direction of PowerShell by Open Sourcing “all” Windows PowerShell source code. Address the number one ask from our customers and partners by supporting PowerShell on Linux and Mac OS X. Existing Windows customers and partners shall not experience changes to their scripting experience, quality, support and interop because of our decision to open source PowerShell. Learn and adopt DevOps agile approaches to evolve our engineering culture, engineering system, processes and tools. Start small and learn by open sourcing portions of PowerShell and DSC as GitHub projects.

There was however, a missing technical piece; a version of .NET working on Linux. Shortly after agreeing on the above goals, we received exciting news: .NET Core will support a number of popular Linux distributions! The news opened the door for the Microsoft PowerShell and Enterprise Open Source teams to start the design and prototype phases – a few months later developers started coding and working in a private GitHub repository.

Microsoft’s culture and leadership also started to shift towards a more open, customer-obsessed company, and Satya Nadella’s famous quote, “Microsoft loves Linux,” encouraged and supported the team in pursuing our vision to open source Windows PowerShell and support Linux – So we started the journey to deliver our goals!

The PowerShell team recognized that we would need help, and had much to learn, especially from the Linux communities. The team started the journey with the OpenSSH for Windows project about a year ago. We worked with the OpenBSD/OpenSSH communities to deliver this project, and I’d like to take this opportunity to thank them for their continuous support and advice.

We partnered closely with Microsoft’s Azure team, as they have made significant investments in PowerShell Cmdlets and DSC resources in the past few years. We worked with them to deliver a set of Cloud heterogeneous cmdlets for Windows and Linux. I highly recommend watching the Azure demo by Jeffrey Snover, because it demonstrates PowerShell’s potential to be a great tool to manage anything from anywhere.

We also worked closely with third-party partners to validate the PowerShell on Linux and open source experiences. I’d like to highlight, in particular, the collaboration with the engineers from Amazon AWS, Chef, and VMware, and thank each of them for their efforts to port Windows PowerShell Cmdlets to Linux and for delivering the PowerShell on Linux demos –The PowerShell team really appreciates it! – You can watch their cool demos in the PowerShell team’s YouTube Channel

We also learned tons from the .NET Core team about creating an open source project. The .NET Core team pioneered inside Microsoft the new “open” culture and new thinking by delivering customers an open source platform for Windows as well as Linux. Their experience enabled the PowerShell team to start the open source journey with empathy and confidence. Thank you!

As I mentioned earlier, one of our goals with open sourcing PowerShell was to start small and learn. So we embarked the open source journey last year by delivering portions of PowerShell and DSC components: DSC Resources, Script Analyzer, Editor Services, PowerShell Documentation, and launched the PowerShell Gallery.

The experience of working in GitHub to maintain these small projects and maintaining the PowerShell Gallery as a service were foundational and critical to the success of delivering the PowerShell open source project

Why? Change is hard, especially after years of working and delivering PowerShell using the predictable Windows engineering system and release processes. Adapting and switching to a new culture, engineering system and new processes is not something you want or can do overnight. The risk of making costly mistakes increases rapidly if you do, and we did not want existing Windows PowerShell customers and partners to experience quality or support issues because of our decision to open source Windows PowerShell. Each open source step we took was designed to teach us what it took to be successful and establish the internal processes and relationships – Imagine the conversations required when we took the initiative to ship a community sourced project, Pester, in Windows for the very first time!

Based on this, the team took a gradual and incremental approach with refactoring the code, and migrating from the Windows engineering system to the GitHub PowerShell project – it created a great opportunity to learn and adopt the DevOps culture and best practices. We adopted internal and open-source engineering tools, integrated to continuous integration (CI) services, created new agile engineering processes and build system, moved to a Pester based test framework, and established the Community Governance for managing contributions.

You can now imagine how proud I am, and how difficult it is for me to express in words my gratitude to each member of the PowerShell Software Engineering and Program Management teams, and all the Partners who participated in this project. I am so fortunate to be part of this great team and community. Their effort and accomplishment with delivering in parallel a new open source PowerShell and a traditional Windows PowerShell versions (See WMF 5.0 for details) is simply put, amazing! To me, they are clear examples of growth-mindset, passion, superb engineering, collaboration, and risk-taking. All the hard work however was worth it, because we had fun doing it too J!

Delivering this project was a significant effort, and we didn’t do it alone. I’d like to thank the Microsoft’s Business team, Doc team, Legal team, Marketing team, Support team and our leadership and management teams for their support, trust, hard work and collaboration to help made this “big idea” a reality.

Finally, I’d like to thank and highlight the work and effort from the Microsoft Enterprise Open Source team with delivering the Linux PowerShell editions – without them we couldn’t have delivered PowerShell on Linux support!

There’s still a lot the work left to do before a PowerShell version based on open source is ready for customers to deploy in production systems – this is the primary reason for announcing today the “alpha” release. Our mission is to work with you (the PowerShell Community) to deliver this next milestone — we’ll need your help with increasing test coverage, continuing improvement of the Linux experience and resolving the list of GitHub issues and backlog. In the upcoming weeks we will put together a roadmap proposal to deliver production supported builds for Windows and Linux.

I’d like to close with a final thought about today’s announcement. We’re starting a new, exciting chapter with open sourcing PowerShell and PowerShell on Linux. I’m optimistic that we did many things right; however, as part of starting a new journey, we’ll discover mistakes and new challenges. We believe that working together to resolve these challenges will make the PowerShell Community even stronger and more trusted . The Microsoft PowerShell team is committed to be an active, responsible and transparent contributor. We hope you will join us, and together we’ll focus on making PowerShell the best management and automation tool on the planet!

So, are you ready to contribute? Go to the Contributor Guide in GitHub to learn how.

Angel Calvo,

Twitter: @ANGELCALVOS

Helpful Links