Meet the LISA '12 Instructors: Steven Murawski talks PowerShell Fundamentals

In this interview, Greg Riedesel talks to Steven Murawski, a first-time instructor at LISA. Steven will be teaching the PowerShell Fundamentals class on Tuesday morning, helping to get the word out about Microsoft’s command-line mojo. If you do anything with Windows, you need to know this stuff and Steven will help you.

Greg: I see you're a first-time trainer. What drew you to teach PowerShell at LISA?

Steven: I'm a longtime member of the PowerShell community, which is growing rapidly, but most of the training and conference sessions I’ve done are very focused around Microsoft targeted events.  I've been a member of LOPSA for about five years now and the LOPSA-Madison chapter is one of the first user groups I spoke at, so I've been trying to reach out more to audiences that are not the typical targets for many of the PowerShell focused speakers and trainers.  

I've been teaching PowerShell for a while and over the past couple of years, I've taught this class at PICC (now LOPSA-East) and last year I added the Cascadia IT Conference. Through my connections at those conferences, I was encouraged to submit a session for LISA.  This will be my first time at this conference, but I've heard a lot of good things about it and I'm very excited.  The line up of training and technical sessions looks fantastic.

Greg: What do you expect attendees to get out of your session?

Steven: If you come to my class, you can check all your preconceived notions about the Windows shell experience at the door.  We'll be covering, from the ground up, how PowerShell is different, including ways to navigate and learn about the environment.  We'll spend a lot of time on learning how we can use the shell to teach the shell, so that attendees can walk away with the tools to figure out their next steps.  There are also a number of "quick wins", little snippets of commands and patterns that can be put immediately to use in most environments.  Finally, we'll talk about and explore how PowerShell fits into the environment and plugs in to things like ActiveDirectory and Exchange.  

Now, those are those are the topics on the agenda, but I haven't had a class yet where some attendee hasn't brought or come up with a question about a problem facing them that we've been able to work through or get them pointed in the right direction.  I love when attendees bring questions, because then we can make sure that we are creating some real value for their environment (and very often that answer is on the agenda for the class, it's just identifying where and how to apply it).

Greg: Where do you see PowerShell living in sysadmin space?

Steven: PowerShell is THE management tool in the Microsoft space.  Whether an admin is using it directly or using tools that issue PowerShell commands, PowerShell is rapidly becoming the unified management API for Windows workloads.

There are efforts underway to stretch the boundaries where PowerShell is applicable.  Today, PowerShell is very effective in managing most storage and virtualization platforms and PowerShell has it's sights set on managing network devices (some support already) and with the work on the Open Management Infrastructure (OMI), which is a highly portable management infrastructure exposing CIM (common information model - DMTF standard) over a WS-Management endpoint.  Cisco and Arista are both working on incorporating OMI into their switch management.

Greg: Is PowerShell a true dos-shell replacement now?

Steven: PowerShell is a true DOS shell/CMD.exe replacement.  I'd like to make a distinction here — when talking about shell environments, most people merge the shell and the applications that run in it as the "shell".  Functionally, that is correct, but it misses a key point, that the shell is the environment in which these applications run, and the applications can potentially be run in more than one shell.  For example, when you think of bash, ksh, zsh, or many other shells, you don't associate ssh directly with any of them, even though when you compare bash on say, RedHat, to PowerShell on Windows, one of the common comparison points is, "Where's SSH?  I have that in bash."  SSH is separate software that is accessible from bash (or other shells).  I can install an SSH server that targets a PowerShell endpoint on a Windows box, just like I can on a Linux machine.  

Let's bring this back to just the Windows space, PowerShell runs most of the applications that run in cmd.exe.  The main difference is the output of the traditional commands tends to be text to standard out, where PowerShell command (cmdlets, scripts, and/or functions) tend to output rich structured data in the form of objects.  PowerShell is becoming available in more and more environments.  It is available in Server Core implementations and with Server 2012/Windows 8, it is available in WinPE, the pre-installation environment.

The only caveat to PowerShell being a shell replacement is the requirement on the .NET platform.  Windows servers can be installed without an .NET Framework components, in which case PowerShell would not be available.  This leaves cmd.exe a small but vital role.

Greg: What improvements has Microsoft made with PowerShell since it first came out?

Steven: PowerShell is currently in version 3, which released with Windows 8 and Server 2012 and available downlevel to Windows 7, Server 2008 R2, and Server 2008.  I'll hit some of the high points by version (there are more):

Version 2

  • PowerShell Remoting (over WinRM)
  • Background jobs
  • Debugging
  • Advanced Functions
  • Modules (for command deployment and packaging)
  • Eventing
  • Integrated Script Editor (ISE)
  • Over 100 new core cmdlets

Version 3

  • Enhanced Remoting -> Disconnected sessions, robust network connections
  • Delegated Administration
  • Simplified language syntax
  • Workflow (long running jobs that can persist across service restarts and machine reboots)
  • Native task scheduler integration
  • Improved command discovery
  • Enhanced ISE
  • Improved performance over V2

One of the major changes in the server platform as Server 2012 was released was the increase in coverage of commands.  In Server 2008 R2, there were about 240 or so commands available in box to support the various roles and features and operating system components.  In Server 2012, that increased to around 2,400.  There are very few areas of the operating system in Server 2012 that PowerShell does not offer native coverage for.  

Greg: Is PowerShell at a state where I can ssh to it from anywhere like I can bash on Linux?

Steven: You can SSH to PowerShell.  It requires that an SSH server be installed, same as on a Linux box.  There are two main differences with that... Most Linux distros have SSH installed by default (though not always).  There are open source and commercial alternatives to getting an SSH server in place on Windows that will host a PowerShell shell for the incoming user.

Microsoft does not — and, my opinion, won't ever — ship SSH in the box.  Second, SSH is not the default remoting for PowerShell. PowerShell utilizes and is optimized for remoting over WinRM, which is Microsoft's implementation of WS-Management. That's where PowerShell remoting gets really powerful, allowing for rich fan-in and fan-out scenarios scaling out across potentially hundreds of machines and allowing for the return of structured data. When running PowerShell over SSH, output is just written to standard out and sent over the wire, losing some of the richness PowerShell offers.

As for anywhere access, Server 2012 offers new options, PowerShell Web Access and Odata Management Endpoints. PowerShell Web Access is a PowerShell console implemented in HTML and Javascript that front ends a PowerShell remoting endpoint, allowing remote PowerShell access from any web browser, including mobile devices. Odata Management Endpoints are custom rest endpoints that expose certain sets of commands and return XML or JSON representations of the output from the commands.

Greg: What other sessions are you excited about at this year's LISA?

Steven: The SuperSysadmin and Cloud Computing tracks in the Technical sessions both look really interesting.  What I'm most excited about is the Papers and Reports on Security and Systems Management on Wednesday afternoon.  The paper on a Declarative Approach to Automated Configuration sounds very interesting.  I love the concept of setting up a desired configuration and letting a tool keep my servers in that state.  

I'm also really looking forward to the class Friday on Hadoop for Operating Staff.  I've been looking into Hadoop as a back end for some log analytics and I'd like to get up to speed on how to create and maintain a proper, highly functional Hadoop cluster.  

Finally, the biggest benefit to any conference is the hallway and after-hours conversations. The chances to get direct face-to-face feedback and ideas from others in our field is an opportunity that shouldn't be squandered.  Recently, I've been going to a number of conferences and the best takeaways for me always include something that happens in a side conversation or an open space session.  I'm super stoked about the conference and can't wait!

Greg: What sort of games do you play?

Steven: I used to play a lot of role playing games and card games like "Magic, The Gathering" back in high school and college, but recently I've mainly been a board game guy.  I play a lot of Scrabble with my wife, and Monopoly, Risk, and Battleship round out some of our game night favorites.  I'm really quite a boring guy when not on a computer.

Thanks to Steven for taking the time for this interview. If you haven't registered for LISA '12 yet, it's not too late to take advantage of our Early Bird discount (ends on November 19): https://www.usenix.org/conference/lisa12/registration-information (All work and no play? No way! Don't miss our Board Game Night!)