PowerShell 3.0 and Monitoring Earlier Versions of Windows Server and Hyper-V

If you’re not rushing to upgrade to 2012, you can still gain several of the benefits on your 2008 and 2008 R2 installations. If you have begun upgrading some of your systems to 2012 and still have any systems running those earlier operating systems, you also have some incentive.

Why It Matters

PowerShell 3.0 provides a number of improvements over 2.0. For instance, in a previous post I had to give separate directions for 2008 R2 and 2012 because PowerShell 2.0 doesn’t process the += operator quite as nicely. With this upgrade, you can perform the same type of operations on 2008 and 2008 R2.

PowerShell is packaged with the release of Windows Management Framework 3.0. Also included in that package is an expansion to Windows Management Instrumentation (WMI). Unfortunately, you don’t get all the classes that are available in 2012, but you do get enough to manage 2008 R2 systems from the Server Manager in 2012. One benefit of this is the ability to monitor Performance Counters through the 2012 interface.

Compatibility

This will work on any flavor of 2008 R2, whether it be Hyper-V R2, Core, or a GUI edition of Server. For 2008, it will only work on a GUI edition.

Additional Note: A reader dropped us a note with a head’s up regarding Exchange compatibility. WMI and PowerShell 3.0 are not supported on any installation of Exchange 2007 or 2010, whether it is server components or merely the management tools. Further details are available on this blog posting. Comments on the thread also indicate that this presents problems for Small Business Server 2011 and System Center Virtual Machine Manager. Watch for these products to receive updates that make them compatible with Windows Server 2012. I am not personally aware of the extent of the introduced issues; I have the Exchange 2010 management tools on one of the units I tested this software on and they are not exhibiting any unusual behavior. If you do have problems, the fix is to simply uninstall Windows Management Framework 3.0. As a rule, I give proper credit to anyone who shares this sort of information, but this particular reader did not release us to use his full name so I’m compromising. Thank you, Trey!

Prerequisites

If you are missing any prerequisites, you may get a message: “The update does not apply to your system”. If you don’t get the message, then the update may install initially but on reboot, you’ll get “Failure configuring Windows Updates. Reverting changes.”

The first thing you need to do is ensure your 2008 installation is at Service Pack 2 or that your 2008 R2 installation is at Service Pack 1. You can run “WINVER.EXE” on a GUI installation to verify. On any edition, open a PowerShell prompt and run:

(GWMI Win32_OperatingSystem).ServicePackMajorVersion

The next thing you need is the full .Net Framework 4.0 distribution. If you’re working on a Hyper-V or Core installation, you’ll need a specific installation file. For the GUI edition of Windows Server 2008 R2, get the full installer. The links at the bottom of that download page will also get you to the smaller web installer, if you prefer. It’s important that you don’t use the Client Profile version as that is not sufficient.

On Server Core or Hyper-V, run the following (feature names are case sensitive):

DISM /Online /Enable-Feature /FeatureName:MicrosoftWindowsPowerShell /FeatureName:MicrosoftWindowsPowerShell-WOW64 /FeatureName:NetFx2-ServerCore /FeatureName:NetFx2-ServerCore-WOW64

Finally, download the Windows Management Framework 3.0 installer and run it. A reboot is required.

 Verification

Open a PowerShell prompt and run the following:

$PSVersionTable

You should see the following:

Name                           Value
----                           -----
PSVersion                      3.0
WSManStackVersion              3.0
SerializationVersion           1.1.0.1
CLRVersion                     4.0.30319.18010
BuildVersion                   6.2.9200.16434
PSCompatibleVersions           {1.0, 2.0, 3.0}
PSRemotingProtocolVersion      2.2

 

In order to get the Windows Server 2012 Server Manager to connect to your newly upgraded system, you need to enable remote management. Still in PowerShell, run the following:

Enable-PSRemoting -Force

Performance Monitoring

First, you’ll need to install an update. Specifically, you’ll need KB2682011, but it is contained in a later roll-up package (Internet Explorer required).

If you haven’t already, add the server in Server Manager. Right-click on “All Servers” and click “Add Server”. You’ll be presented with the following dialog box. You can click the “Find Now” button to see all computer objects in your domain or you can type some or all of the computer’s name in the “CN” box first to narrow your search pattern. Once you’ve found the server you want, double-click or it press the button with the right-arrow to move the server over to the “Selected” box. Press “OK”.

Add Server in Server Manager

Add Server in Server Manager

Wait for the console to refresh, which could take a bit of time. If there are any problems, the console will present a red flag. Otherwise, the server field will populate with the newly added system and a “Manageability” status of “Online – Performance counters not started.” You can right-click on the server here and choose “Start Performance Counters”. You can also scroll down to the “Performance” section and perform the same task on its entry there.

Start Performance Counters in Server Manager

Start Performance Counters in Server Manager

You can now monitor and manage your legacy systems from a Windows 8 or Server 2012 Server Manager screen.

 

Altaro Hyper-V Backup
Share this post

Not a DOJO Member yet?

Join thousands of other IT pros and receive a weekly roundup email with the latest content & updates!

Leave a comment or ask a question

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

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

Notify me of follow-up replies via email

Yes, I would like to receive new blog posts by email

What is the color of grass?

Please note: If you’re not already a member on the Dojo Forums you will create a new account and receive an activation email.