Weekend Scripter: Reasons to Get Excited About PowerShell
Summary: Microsoft Scripting Guy, Ed Wilson, discusses why he is excited about Windows PowerShell. Microsoft Scripting Guy, Ed Wilson, is here. A couple of months ago I was out in Redmond, WA, to meet with various people from the Windows PowerShell team, to talk to colleagues, and of course, to have one-on-one sessions with various managers, managers’ managers, and even managers’ managers’ managers. During one of these sessions, one of these managers asked, “Why are you even at Microsoft?” not in an accusative manner, but it struck more as a sincere attempt to ascertain my reasoning for staying with Microsoft, when clearly there are many opportunities outside of Microsoft for someone of my talents and abilities. Having worked at Microsoft, after all, is not the worst thing one can have on one’s CV. In the end, I do not think I gave the “proper” answer. The question seemed to arrive completely from left field, and I probably stumbled around a bit before muttering something rather inane, but the question has stayed with me in the back of my mind. Here is my answer to why I am here …
I am excited about Windows PowerShell
Personally, I think that Windows PowerShell is the most exciting technology that Microsoft has released in over 30 years. I believe it is a real game changer for network admins. I am thoroughly convinced that IT Pros must learn Windows PowerShell to be successful and that those who start now are already a bit late to the game. One of the big tenants from the Windows PowerShell team is that they do not want you to waste your learning—everything you learned about Windows PowerShell in Windows PowerShell 1.0 applies to Windows PowerShell 2.0 and on to Windows PowerShell 3.0. If you start now, you are already three versions behind. The other night, the Scripting Wife and I had dinner with Marc Van Orslow (MOW), the Windows PowerShell MVP in Zurich. Of course, conversation immediately turned to Windows PowerShell. He mentioned that people learning Windows PowerShell now must come to grips with thousands of cmdlets. “We had it easy,” he said about Windows PowerShell 1.0. “There were only 109 cmdlets,” he added. This same sentiment was echoed by Mark Minassi at the Minassi conference, “Get out in front of the wave and you can ride it to success. Let the wave pass you, and you are paddling for the life of the release.”
Windows PowerShell really does make things easier
Many software releases add new features version after version after version—indeed it seems that access to certain features seems to drive the need to upgrade. Sometimes performance is improved in a new release, but that is rarely a reason to upgrade. But usually what happens is that new features add complexity, and therefore, for the poor network admin, or IT Pro upgrading to a new version of software, it entails learning a lot of new techniques for administration, walking through various wizards hoping that the defaults are good enough, and keeping one’s fingers crossed while holding one’s breath when the server comes out of the final reboot—did it work? Nowhere in the process is the expectation that, “Once deployed it will be easier to configure, easier to manage, and easier to maintain because it leverages the same management tools that a dozen other server products use.” Until now! Windows PowerShell provides a standard set of tools that behave in an intuitive manner to provide standards-based management interfaces. If you know Windows PowerShell, you can manage Exchange, SQL Server, SharePoint, Hyper-V, Active Directory, and many other products from Microsoft.
Save time, get free documentation
If you spend an hour clicking with a mouse, in the end, you have a sore wrist and perhaps also a sore elbow and shoulder. If you spend an hour writing a script, in the end you have an artifact—something you can use again and again. MOW told the Scripting Wife and me a story while we were eating dinner … this happened back in the old-fashioned VBScript days—his boss came into the office, and said that they were changing DNS servers, and therefore, they needed to make changes on 130 servers. MOW’s co-worker was very good at using RDP and set off to make remote desktop connections to each of the servers. Once connected, he proceeded to manually change the DNS servers on the machines. MOW, on the other hand, got on to a search engine, and found a VBScript on the TechNet Script Center that showed how to change DNS server settings via VBScript. He spent a little bit of time cleaning up the script, and adapting it to his needs, and was ready to run the script. In the meantime, his co-worker was just finishing the last computer—and so he won the race. But, the next day, the boss sent them an email that said, “Whoops, I gave you guys the wrong IP address for the DNS server. It was supposed to XXX.XXX.XXX.yyz, and NOT XXX.XXX.XXX.YYY, and so I need you to go back to all the servers and change them to point to the correct DNS server.” MOW, opened the command prompt, and in a dramatic fashion raised his finger to his shoulder, hung it for a few seconds, and let it drop onto the enter key—“DONE!” he announced. Of course, if Windows PowerShell were around back then, MOW would have won the first race, too, because Windows PowerShell has cmdlets for configuring DNS client settings.
Windows PowerShell is the gift that keeps on giving
Again and again, I meet people who learned Windows PowerShell because they were tasked with managing a particular product, such as SQL Server or Exchange. They learn the minimum amount of Windows PowerShell they need to manage the product, but somewhere along the way, they become addicted to Windows PowerShell. They are hooked, and now they begin to use Windows PowerShell for everything. They seek out opportunities to automate and are always wanting to figure out a way to “do something in Windows PowerShell.” But what is better than that, they also become evangelists for the product. They begin to write blogs, form Windows PowerShell user groups, and Windows PowerShell Saturday events. They start answering questions on the Scripting Guys forum, and they constantly talk about Windows PowerShell to their friends, family, and co-workers. As MOW said, “It is not work if you enjoy it. It is not about only doing 40 hours a week.” The more you engage with the Windows PowerShell community, the more they engage with you. Many great and new friends have grown from a shared interest in Windows PowerShell.
Windows PowerShell is a tool
When all the hype leaves, and the smoke clears the room, I am left with the fact that Windows PowerShell is a tool. Like any tool, to use it better, requires practice. To use it well, requires consistent practice. I used to know a person who was a professional carpenter. He would always practice using his hammer. Especially when he was bored. He would line up a length of maybe 20 nails barely sticking in a 4×4 board. He would then come to the line, and in one hit, sink each nail—20 nails, 20 hits with the hammer. It was really impressive … he was like a human nail gun. Me? Well, I could get some nails sunk in one hit, some bent over, some went flying, and a few required an additional smack with the hammer. No way could I go 20 for 20 … more like 6 home runs, 3 runs batted in, and 11 errors. So, practice with Windows PowerShell and play around with it. This is one reason for the Scripting Games. Planning for the 2013 Scripting Games is already underway. This year PowerShell.Org will be taking the lead because, first and foremost, the Scripting Games is a community event, and so it makes sense for the community to take the lead. Well, I still have some unpacking to do. See you tomorrow. I invite you to follow me on Twitter and Facebook. If you have any questions, send email to me at email@example.com, or post your questions on the Official Scripting Guys Forum. See you tomorrow. Until then, peace.
Ed Wilson, Microsoft Scripting Guy