Why I'm In Love With PowerShell

Our guest blogger David Klemke has just one thing to tell you: PowerShell is going to transform your Windows Server 2012 experience. Here's why.

Picture by PowerShell Magazine

Automation is the most critical skill that any system administrator can develop. For small enterprises this might feel like an exercise in futility — it really doesn't take too long to do a repetitive task on two servers — but with the release of Windows Server 2012, Microsoft has made it quite clear that anyone who continues to ignore PowerShell will be left wondering why they're so behind the times.

Newcomers to the PowerShell world need not fret however, as the improvements that are coming in V3.0 are significant both in terms of the breadth of new and improved functionality, as well as reducing the barrier to creating scripts on the PowerShell platform. Even if you're not operating at cloud scales, there are a lot of features that you can (and should) take advantage of.

For starters there's been something of a cmdlet (commandlets) explosion in PowerShell, with the number available jumping from 587 in 2008 R2 to well over 2300 available in Windows Server 2012. The reason behind this is quite interesting: all Microsoft management applications are now required to be compliant with Microsoft's Common Engineering Criteria which states that they must expose all their management surfaces through PowerShell or other providers. Exchange 2010 administrators will be very familiar with this idea as the Exchange Management Console was built on this principle and all of the GUI operations can be executed through an equivalent PowerShell command.

This is huge for administrators as whilst we all appreciate a good GUI I know I've found myself in more situations than I can remember where I needed to automate something that was easy interactively but required multiple layers of coding wizardry to complete through the command line. Improving PowerShell's functionality with a wider range of cmdlets means that Windows Server 2012 can really be the automated beast that's required for it to become a true Cloud OS.

The icing on this delicious PowerShell cake is the improvements that are coming to the Integrated Scripting Environment (ISE) as well as an amazingly under-hyped feature called PowerShell Web Access. The ISE has undergone some significant revamping and now includes such features as IntelliSense, tab completion, plugins and nearly everything we've come to expect from serious development environments like Visual Studio. Honestly I've steered clear of the ISE in the past due to its lack of functionality when compared to other editors (and the existence of plugins that allow PowerShell to be edited in Visual Studio) but now I can't see myself using much else; it's just that good.

PowerShell Web Access is pretty much what the name implies, a service which exposes PowerShell functionality over the network. At its simplest level it's just an easy way to get a PowerShell prompt on a server through a web browser, handy if you're administrating remote servers and remote desktop is unusable, but the real power of PowerShell Web Access is that it can expose any PowerShell cmdlet to the network. That means that you can run commands on servers by simply authenticating to the gateway and then sending the correct link. To me that opens up some incredible possibilities for Windows Server 2012, ones that took an incredible amount of effort to implement previously.

Azure Developments

One of the messages that I've heard quite often here at TechEd 2012 is that Microsoft is now heavily focused on removing constraints to developing applications. That mantra has been quite clear in the sessions I've been taking part of as many of the traditional barriers to application development, especially cloud applications, are being broken down by services Microsoft is providing. As someone who worked with Azure long before any of these services were available for general consumption I can attest that these improvements are impressive and the barrier to entry for application development on the Microsoft platform, both traditional and cloud, has never been lower.

Scaling is one of the things that cloud does well but knowing when to scale can be a torturous reactive exercise if you don't have some kind of automated solution. Now rolling your own isn't too difficult but it's another bit of code you need to maintain and that can be prohibitive for smaller development shops. Windows Azure Scaling Application Block (WASABi) is in essence a worker role that can hook into your Web and Worker roles and control the scaling for you. The amount of code to use it is minimal (just a handful of lines), with the rest being done through configuration files (all of which have great accompanying GUIs). It has visibility into any performance counter that's available in Windows Server 2012 allowing you to create incredibly intelligent metrics that will scale your application up or down as the load fluctuates. You can also set budget limits as well, making sure that a surprise burst of traffic doesn't drain your wallet unexpectedly.

If your more into the mobile application space Microsoft has also created a bunch of services to make application development on there much more painless. Windows Azure Access Control Service is in essence an authentication and authorisation middleware application that allows you to take advantage of other login services (such as Facebook and OAuth for example) without having to worry about them changing their APIs or authentication models. The Microsoft Push Notification Service brings a first party solution to push notifications to mobile applications, something that has been sorely missing from their mobile platform. There are also Windows Azure Toolkits for all the major platforms, making Windows Azure accessible no matter what device the end user has.

Yesterday Microsoft showed me that from a platform perspective it was ready to become the platform for virtualisation with a vision to providing a seamless transition to cloud services. Whilst we might disagree on some of the definitions it's clear that Microsoft don't take the cloud ideal lightly. Today's sessions have shown me that not only does Microsoft have the right platform, it has also put significant effort into the app ecosystem. The barriers to migrating services onto the cloud are getting increasingly small and that's thanks to the enormous amount of ready to run services that Microsoft provides. For someone like me who put Azure in the too hard basket last year I'm finding that many of issues are simply not present anymore and that's enough for me to start firing up Visual Studio once again, although this time it might be the 2012 version.

Visit Lifehacker's TechEd 2012 Newsroom for all the news from the show.

David Klemke is covering Windows Server 2012 for Lifehacker using his ASUS Zenbook WX32VD.


Comments

Be the first to comment on this story!

Trending Stories Right Now