For a long time, I avoided learning powershell, instead relying on the good old command prompt and/or using the bash emulators like Cmder or ConEmu. I thought PowerShell was a clunky shell where you have to type longer commands with PascalCases for the same tasks that you could do with two characters in bash. For example, cd in bash vs. Set-Location in PowerShell.

I was sooooo wrong.

Couple of days ago, I stumbled across Jeffrey Snover's (inventor and the architect of PowerShell) 2018 talk on 'PowerShell: State of the Art' at the PowerShell conference, and I was really fascinated by the philosophy behind PowerShell and all the things that it allows you to do as a system administrator.

Most importantly, I understood why PowerShell is so different than a bash shell. As Jeffrey Snover expresses so eloquently, Unix/Linux based systems primarily operate on text. That's why you have commands like awk, sed, grep, etc. that make text manipulation so easy. In contrast, Windows' primary focus is on GUI-based applications, which communicate using APIs and objects, not text. Hence you need a different way of thinking if you are managing a Windows machine, compared to a Linux machine.

PowerShell allows you to do just that.

After listening to a few more talks from Jeffrey Snover on YouTube and on Hanselminutes, I was really hooked and realized that learning PowerShell is the best investment I can make right now that will pay huge returns over a long term. Microsoft is embracing the open source, .NET 5 is coming soon in a few months, and IT infrastructure is moving more and more towards Azure. PowerShell is one piece of glue that holds all these pieces together. As a software developer interested in the DevOps, PowerShell is a tool that I should have.

One thing that I didn't used to like about PowerShell is the UI it came with. For some reason, it wasn't aesthetically pleasing for me, and I didn't see myself writing scripts in that editor environment. However, with the new Windows Terminal on a Dracula theme, with the fun Cascadia Code font, I've got everything I need from a terminal. This is how my terminal looks now, and I just love it.
It can be frustrating to learn PowerShell in the beginning, especially if you are coming from a Unix/Linux background. If you are used to typing cd, ls, mv, cp, etc. on a bash, you will find Set-Location, Get-ChildItem, Move-Item, Copy-Item too verbose. No worries. All your basic bash and cmd incantations work just fine on PowerShell. It has aliases for the common commands to make you feel comfortable when beginning to learn PowerShell.

It's only when you start writing bigger scripts for automation you start realizing the true power of the verbosity of the PowerShell cmdlets. It's much easier to read Get-Job and understand what the script is doing, compared to reading gjb and having to search the manual to find what it's doing. It helps to write maintainable scripts.

Last night, I got Bruce Payette's (co-author of PowerShell) book, "Windows PowerShell in Action" to get a more formal training in PowerShell. The more I get familiar with PowerShell, the more I keep amazed with all the things that it can do. It's like having really sharp knives. You can do a lot of useful things, but you can also cut yourself if you are not careful.
PowerShell in Action

I also came across the MSDN course on "Getting Started on PowerShell", offered by Jeffrey Snover himself, along with Jason Helmick. It's a really fun course, something that I wouldn't have expected from an MSDN course. Really enjoying it.
Learn PowerShell. It's worth the effort.