How I learned PowerShell

Learning something new can be difficult, even for the most seasoned IT veterans. In fact, sometimes the older and wiser you are, the more difficult it is to learn and accept a way of doing things. This is my story of how I learned PowerShell.

Back in 2011, I was largely a GUI-first Windows Sysadmin. I worked with AD, Exchange, VMware and many other products that allowed me to use a GUI and not necessarily a CLI. At this time, I could use a CLI a little, but I was admittedly very clumsy. I would Google anything somewhat advanced as I never really took the time to learn even how to write a decent batch script.

When I started a new position, I was given the task of migrating 10,000 on-premises Linux-based mailboxes to Office365 (or at this point it was branded as Live@edu since it was educational. I thought to myself “Awesome, this should be a fun project”.

At this time, in order to migrate mail and create mailboxes in Live@edu, we used Forefront Identify Manager to sync on-premises AD objects. This worked great for the initial creation, but I still needed a way to move several hundred mailboxes of data via IMAP to the new mailbox. Luckily, there was a tool for that as well.

Before moving a user, I had to set some AD attributes that were necessary for Forefront to sync correctly and right before a migration began. Scripting was the only way.

So, I started down the road of learning this language called PowerShell, which my only real experience with was doing some Exchange stuff. I was started from scratch, so researched books to buy. That is when I came across Learn Windows PowerShell in a Month of Lunches. To this day, I always tell people to use this book to learn PowerShell because I found it to be so good and so easy to read. I also read a lot of blogs. During that time Adam Bertram probably saw a lot of hits coming from New Jersey on his.

I am going to admit something here. I really don’t love using books or reading as learning tools. I prefer to do stuff and learn that way. This is one of the rare circumstances that I actually just read the book and did exercises, and by golly it actually effing worked. I learned a scripting language enough to actually write the code. It allowed me to efficiently accomplish moving all these mailboxes into the cloud. To this day, its my proudest project. One because it was a pretty large-scale thing to do, and the other is because I had to be challenged to learn a very new and difficult thing and I did.

Now, it was not just that book that allowed me to learn PowerShell, using it with a project that forces you to automate something was a great way to learn it. I practiced some of the techniques like foreach loops and the pipeline. I downloaded various scripts I found on the internet to use and explore, although I would caution against doing this for too long.

I know that chances are at this point, if you need a script for something, you can probably find it somewhere. If you are learning PowerShell, don’t do this. Take the time to create that script or module yourself, at least while you are learning the basics. It will benefit you tremendously and maybe even yours will be better than the one found on the Gallery. Who knows.

That is my story of learning my most beloved tool. The great thing about learning something new and challenging is that when you have done it, it makes the next thing you learn that is new and challenging easier. You gain confidence in yourself and you know that you can do it.




Comments are closed.