When it comes to Windows system administration and automation, PowerShell is traditionally the go-to tool for IT professionals and developers.
Described as a task-based command-line shell and scripting language, it allows you to control and automate the administration of operating systems and the applications they power.
Created by Jeffrey Snover, Bruce Payette, and James Truher in 2003, PowerShell runs on the .NET framework from Microsoft and supports Windows, Linux, and MacOS devices. Its use cases have not only evolved over the years, but a large community of like-minded techies has emerged.
Ed Dipple, Lead CloudOps Engineer at DevOpsGroup, uses PowerShell extensively on a day-to-day basis. In this piece, he talks about the benefits of the tool, how you can get the most out of it, and how you can get involved in the growing PowerShell community.
Accelerating digital transformation
Managing systems isn’t an easy task, but PowerShell provides you with a consistent and simple way to control the complexity involved. Ed’s view is that it makes life as a developer easier, particularly when looking to maximise productivity and handle data.
“PowerShell was originally designed to replace the Windows Batch and VBScript languages that were historically used to automate repetitive tasks in the Windows world. What makes PowerShell valuable compared to Linux-based tools such as Bash is that everything is treated as a .NET object. This allows you to read and manipulate data easily,” he explains.
As PowerShell has evolved over the years, it’s become popular among professionals and organisations embarking on digital transformation journeys. Ed says: “PowerShell plays an incredibly valuable role within DevOps. Its use cases include server auditing, parallel server updates, creating servers in Azure, and managing Active Directory. In one language, you can automate all the systems you encounter.”
On a daily basis, Ed manages complex systems and works with a variety of enterprise clients. He uses PowerShell to streamline his workload. “I mostly use PowerShell to test and update the state of Windows servers. But it’s also handy for automating various tasks within Azure,” he says.
“More recently, I’ve been using it to model user workflows in the absence of a rich web interface. Without PowerShell, working in the Windows environment would be a more difficult experience.”
If you’re just getting started with PowerShell or are looking for things to do with the tool, Ed has some key tips. He recommends: “I’d say definitely make sure you’re using Pester. It’s a testing framework and allows you to work out if the code you’re writing actually works. You can also make use of the ISE and VS code debuggers to go through your code line-by-line and work out which elements don’t work.”
Community is at the heart of PowerShell
Since launching in the early 2000s, PowerShell has seen six major versions released to the public and has improved greatly. However, this has only been possible due to the contribution of developers globally. Ed is one of the IT pros playing an active role in the PowerShell community.
“Last year, the multi-platform version of PowerShell was released – providing compatibility for Mac OS and Linux. But at the time, it was an early alpha version and some of the popular community-supported PowerShell modules didn’t work yet – in my case, Pester and Plaster. I was involved in trying to fix these issues before the version was pushed out to more users,” he remarks.
The importance of community was one of the defining messages at PSDay London 2018.
Ed continues: “My biggest takeaway from the event was during the keynote, when Richard Siddaway said the future of PowerShell is now in the hands of the community.
“Because Microsoft has made many elements of PowerShell open-source, and because it now supports a wide range of operating systems, they can’t handle it by themselves. The PowerShell team want people to drive what the tool is and what it will become over the next few years.”
Driving innovation forward in the PowerShell world may sound like a daunting task, but getting involved in the community is actually simple. “Firstly, check out Stack Overflow and see if you can answer any questions. There’s quite a lot of questions you could help with, and you don’t have to be a PowerShell guru to get involved,” says Ed.
“If you’re using a popular PowerShell module and think it’s missing a feature, just go on GitHub, update it, and create a Pull request. Everything is written in PowerShell, so it’s easy to understand and make some changes.”
As part of the DevOps transformation journey, PowerShell plays a crucial role in automating complex tasks and giving developers greater control of systems. But what’s clear is that the future of PowerShell will be determined by the developer community. You can help to shape what it becomes and how it drives value for your organisation.
To learn more about this topic, sign up for the inaugural PowerShell Cardiff meet-up. Organised by the UK DevOps Collective, it’ll take place at DevOpsGroup’s Cardiff HQ on January 16.
Sign up for the inaugural PowerShell Cardiff meet-up here.