How I caught the coding bug

For the first few years of my IT career, I was strictly a point-and-click Windows admin. Installing a package? Click, install, next, next, next, select button, yadda, yadda, yadda. Create a new AD user? Right click, New > User, yadda, yadda, yadda. You get my drift. I had only been around other Windows admins for a while, so this was the norm. Sure, I would use a CLI when needed, but a CLI to someone who is used to using a GUI is not appealing. Takes practice and it takes time to learn and at the time I was too naive to know how important it was.

Then back in 2011, I started a new role. My first project was to migrate 10,000 mailboxes from a Linux-based email system to Office 365 (then Live@edu because it was a Higher Education institution). So, I started to research what this would entail and quickly this needed to be automated. We could migrate using a GUI, but would be a bitch and would be error prone. It wasn’t feasible. As I was reading documentation, it became clear I needed to use PowerShell to script this process.

At that point, I had used PowerShell a bit with Exchange 2007, but not much more than that. So, I took it upon myself to learn using the book “Learn PowerShell in a Month of Lunches” by Don Jones and Jeff Hicks. For a few weeks I read the book and did the demo’s and finally learned more and more PowerShell slowly. I learned about objects, arrays, cmdlets, modules etc. It was all foreign to me, but over time started to form these concepts in my head and make sense. So, I started to play around with some of these tasks that I needed to for this migration, then creating test scripts, and running them in our trial environment. It was awesome and eye-opening.

When it came down for the actual migration I had a script I would run that took a CSV file of users, created their mailboxes in Office 365 and then moved their data over via IMAP (there is more to this, but it was years ago and my memory stinks). A few hundred users would be migrated each day for a few weeks. Sure there were some hangups, but for the most part, it went pretty smoothly. Now don’t get me wrong, this script was gross looking. Bad formatting, no error checking, a lot of code redundancy, but it did the job. I was proud of it.

When the project was done, I knew that I was hooked on PowerShell. In the world of Windows system administration, there is your life before PowerShell and after. You will never do your job the same once you learn it. Everything changes. Suddenly you start looking at processes and automating them like creating user accounts, monitoring stuff, deploying servers, installing packages, removing files, you name it. Need to do something in Sharepoint? There is a module for it. Need to create 100 users in AD? Use the module and cmdlets and write a script. Want to automate something in DNS in InfoBlox? Yep, someone created a PowerShell module for it. At this moment, chances are if you are managing a system, there is a PowerShell module available somewhere to help you do it. It is a growing open source community with a lot of folks sharing their knowledge, scripts and modules.

Being in IT operations is hard, but coding and automating makes it fun and worthwhile.

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *