For whatever reason, I had never been big on scripting. I wasn’t one to shy away from the command line, and would use it often, but never made that leap to writing my own scripts. I knew enough VB script to be dangerous, and could hack together code that I found on the web well enough to do what I needed, but I wasn’t ever creating totally original scripts. A few years back I began to notice the prevalence of PowerShell, I was hearing rumblings about it everywhere, and I started to notice that most of the Microsoft Management tools were basically just front ends for it. So I decided it was time, I needed to learn to script, and PowerShell would be my medium.
The first thing I did was pick up the book Learn Windows PowerShell in a Month of Lunches by Don Jones. The writing was very clear and concise, and it helped me greatly, I highly recommend it. It’s literally meant to be used for brief periods everyday and actually is quite effective if you only use it over a short lunch break to take in bite size chunks of information each day. I tended to go through it a little faster than that, but not by much… I’d say it took me around two and a half weeks to get through it. I also used the companion website, https://morelunches.com/ and posted a few questions to the man himself, which he answered promptly.
Around that same time, one of my colleagues was also learning, and turned me on to an iPhone app which was immensely helpful. It’s called Memrise, and is freely available on the iTunes store here. Also available for Android, snag it from the Google Play store here. The actual purpose is to help you learn foreign languages, but it works extremely well for anything that needs to be memorized. It’s almost like playing a game, whenever I had a few minutes to spare I would fire it up and commit a few more commands to memory. It constantly references previously learned words/commands to make sure you don’t forget, and has one giant run through at the end that will test your knowledge of all the material covered.
Those two things helped me to create a very sold base to work off of. After that, it was just a matter of applying the knowledge to my everyday work. My mantra became:
Just as with anything, my scripts started off very rudimentary and progressed, becoming more and more complex along the way. I’ll be posting some of my them to the site and explaining why I wrote them, what they’re used for, and making them available for download. As well as highlighting some scripts written by other folks that I find quite indispensable and linking to their sources.
Suffice to say that PowerShell has really changed my entire workflow. I keep a console window open at all times, and 90% of the things that I used to accomplish via point and click are now done via scripts, modules, or one liners typed directly in. It has drastically improved my productivity, and I wonder every day why I waited so long to begin this journey. I have since gotten more heavily into Linux, and find bash scripting much easier now than it used to be, and with PowerShell core being open source and available for use it will be interesting to see what role that will play in Linux administration in the future. I’m also currently being to learn Python and am finding it much easier to pick up on as well.