Saturday, March 10, 2012

Monitoring Windows Server 8 / 2012 BETA with SCOM 2012 Part 2

In Part 1 of this two part blog series, I walked through the process of installing the Windows Server 8 BETA onto a virtual Hyper-V machine. In this post, I'll describe how to install the SCOM 2012 agent onto it and show it being managed and monitored within the SCOM console.

Before you start on the SCOM side of things, a couple of points to note. The Windows Server 8 machine is best off being a member of an Active Directory domain as it avoids having to manually install the SCOM agent.

Note: It is a pre-requisite to have the .NET Framework 3.5 feature installed first before you go and install the agent. Quite a few people have been commenting (see below) on coming across errors with agent deployment and the solution is to install this feature.

Post Update 12.03.2012: A good friend of mine (whose technical opinion I've a lot of respect for), commented to me that there's no point in having this shiny new secure operating system if you're gonna go disabling the windows firewall and UAC on it as it wouldn't be something we'd do in a production environment anyway for obvious security reasons. I totally agree with him and put my initial suggestion of disabling both these security features down to a combination of eagerness to get the solution working and tiredness when I orginally wrote up the post. As a result, I've amended the following sections below that state there's a need to turn off the firewall and I've added in the correct steps to take to get it working in a secure and firewalled environment.

When I tried to initially install the SCOM agent on a vanilla install of Windows Server 8 (with the server in a domain)it failed. I had to turn of User Account Control first and then disable the Windows Firewall in the Windows Server 8 OS. The screens below show the UAC and firewall settings needed to make the agent install work. The reason for this failure was the secure out-of-box configuration of the windows firewall and some modifications need to be made to allow the agent to install.

You can leave User Account Control (UAC) turned on as it doesn't affect the agent deployment. The screens below show the windows firewall enabled and the default UAC setting within the Windows Server 8 Operating System.

Firewall turned on


UAC configured


To configure the Windows Server 8 firewall to allow the specific ports for SCOM 2012, open the Windows Firewall Advanced Configuration window from the control panel and then right mouse click on Inbound Rules to open the New Inbound Rule Wizard


Select Port from the first screen, then click Next


Select TCP and then type in the specific ports that you want to allow - in this example, I've used 5723,5724,80 and 51909 as I will most likely be installing the SCOM Console on this server at some point so want to provision for that now. Click Next once you're finished your selection.


Select All the connection, then click Next


Choose whether or not the rule applies to your domain, private or public profiles, then click Next


Type a description, then click Finish


At this point, you have your inbound rule created, but if you run the SCOM Agent installer wizard, you will receive an error message like the one below


The final step you need to take here (and this is what catches people out when trying to configure this-I know it caught me!), is to enable the already created rules for File and Print Sharing and WMI from within the Firewall Console. Although these rules are already existent in your firewall configuration, they are disabled by default and need to be turned on for the SCOM push installer to actually run.

The screen below shows the File and Print Sharing rules to be enabled


This screen shows the WMI rules that need to be enabled


Note: If you want a full list of all the required ports that SCOM needs, check out this link for more information-paying particular attention to the 'Operations Manager Feature Firewall Exceptions' section: http://technet.microsoft.com/en-us/library/hh205990.aspx

Once you have UAC and the firewall turned off configured the firewall with the relevant ports allowed, you can then start the installation of the SCOM agent.

To begin installing the SCOM agent, click on the Administration tab in the SCOM console and then select the 'Discovery Wizard' option located at the menu on the left hand side.

This will open up the 'Computer and Device Management Wizard' as shown below. Select Windows Computers and click Next


Leave the discovery at Servers and Clients and choose your SCOM management server, then click Next


Either type the name of your Windows Server 8 or browse for it in the following screen, then click Next


Type the credentials for a domain admin account and then click Next


If the credentials you entered are correct and your firewall and UAC are disabled, you should see the computer object being discovered by the wizard. Just click on the server name and then select Next to continue


Leave the settings in the screen below as they are and click Finish


The Agent Management Task Status window should display a Success message if all went well with the deployment as below


If we wait a few minutes for discovery, we can then see the Windows Server 8 object in the Operations Manager Agent Managed console view as below


We can also see it in the Monitoring tab of the console showing a health state (hopefully!)


To demonstrate some of the custom tasks I have running against the Windows Server 8 agent, I need to enable the Remote Desktop Protocol (RDP) on the new server. This can be enabled from the new Server Manager window by clicking on the 'Remote Desktop' link as below


We can now enable RDP for the new Windows Server 8 as shown


Once RDP is enabled on the server, back in the SCOM console at the Monitoring tab, if I click on an alert that is relevant to the new Windows Server 8 machine, I will see my custom '01-Run Remote Desktop' task in the Actions pane on the right hand side. If I click on the alert, then select this action,


I should get prompted for my credentials to initiate an RDP session and then it'll logon to the new server as the screen below shows


Obviously, there will be a number of things not working on this agent and when we go into the Health Explorer for it, we can see that all of the Operating System rollups are in a Not Monitored state. This is to be expected when we haven't yet got a management pack released for Windows Server 8.



This concludes the installation of Windows Server 8 and the deployment of the SCOM 2012 agent to it. Hopefully you've enjoyed this short exploratory series!

Monitoring Windows Server 8 BETA with SCOM 2012 Part 1

When I heard last week that the brand new Windows Server 8 CTP (BETA) was released, I knew I had to do two things this weekend for sure. One was to download the BETA and try it out and the second was to try and configure System Center 2012 Operations Manager (SCOM 2012) to monitor and manage it. Thankfully, I've just finished configuring this scenario and surprisingly enough, it works quite well!

It goes without saying that as both products are currently BETA, that this IS NOT a supported configuration by Microsoft and is for lab/curiosity purposes only!
I've cut this blog posting into two parts due to the screenshots involved. In this first part, I'll walk through the install of Windows Server 8 BETA and the second part I'll go through the installation of the SCOM agent and demonstrate what is being monitored and some custom tasks running against it.

First up, download the Windows Server 8 BETA from the link below-you'll need to register with a Live ID:

http://technet.microsoft.com/en-us/evalcenter/hh670538.aspx?ocid=&wt.mc_id=TEC_108_1_33

Once you have the ISO downloaded, fire up your lab Hyper-V server (you are using Hyper-V right...?), create a new virtual machine with nominal resources (Windows Server 8 doesn't require an extra heavy spec as a minimum configuration for a lab environment - I'm using a VM with 2GB RAM and 1 CPU with a dynamic hard disk on local storage). When you have the VM created, attach the Windows Server 8 BETA ISO file and start it up.

The following screenshots show the Windows Server 8 BETA install:

Select your language, then click Next from the screen below


Click Install Now


Select the type of OS install you want - either Core or GUI based, then click Next


Select Custom install to start a fresh build


Accept the defaults and click Next from the screen below


Chill out for a few minutes while looking at this strange fish graphic as the OS is installing!


Once the OS is installed, we have our first glimpse of Windows Server 8. As I'm still using the old skool style keyboard and mouse (the Windows 8 client is built on touch and I'm presuming the server OS will follow suit), type your new admin password and hit ENTER


Check out the new CTRL+ALT+DEL screen to sign in now! (and yes, it is nearly 23:00 at night while I'm putting this post together!)


Input in your new admin password to logon


When it logs on, you'll be presented with the new Server Manager dashboard as below. If you're familiar with Windows Server 2008, then you'll figure this out pretty easily. I'm loving the new UI though!


No more traditional Start menu button for this release. If you click on the icon down the bottom left hand side of the screen (where the traditional Start menu button always was), you will open up the Server Manager menu from the screen above. If you hit the 'Windows' key on your keyboard, you'll be presented with the Start screen as shown below which includes 'Tiles' to navigate around with.


This concludes part 1 of this short series. In Part 2, I'll deploy the SCOM 2012 agent to the new Windows 8 server and demonstrate what we can do with it once it's installed.

Tuesday, February 21, 2012

SCOM 2012 - Quick Script to Backup your Unsealed Management Packs

Just a quick post to add a modification to a script that's been doing the rounds within the OpsMgr world for the last few years.

There's a management pack available from within the SCOM community that automates the export of your unsealed management packs (which of course contain all of your bespoke customisations and overrides). You can download the management pack for SCOM 2007 from SystemCenterCentral.com here.

This is an excellent tool for maintaing your SCOM 2007 environment, the problem now though is that it won't work with the new and soon to be released System Center 2012 Operations Manager (SCOM2012).

Update January 2013: Since I originally posted this, the System Center community has come up trumps again and a few months back delivered the SCOM 2012 release of this management pack. The new management pack was written by Pete Zerger, Neale Brown, Derek Harkin and Tommy Gunn and can be downloaded from the SystemCenterCentral.com site for free here. As was/is the case with the SCOM 2007 release, this management pack is ESSENTIAL to any SCOM administrator/consultant's toolkit and should be deployed as soon as possible to ensure quick backup and recovery of your unsealed management packs.

This is because of some changes to the Powershell commands that SCOM 2012 uses in comparison to SCOM 2007 R2.

I've taken a small piece of the powershell script from that management pack and made some minor changes to the code to reflect the new 2012 Powershell commands.

Here it is:

$all_mps = get-scmanagementpack
foreach($mp in $all_mps)
{
export-scmanagementpack -managementpack $mp -path "C:\MPBackups"
}

The small difference in the code above in comparison to the old code is that the 'get-managementpack' and 'export-managementpack' commands have been modified in SCOM 2012 to become 'get-scmanagementpack'' and 'export-scmanagementpack'

The above script will first unseal all of your sealed management packs and export them along with the already unsealed ones to a folder called 'C:\MPBackups' on your server.

If you want a script that will simply backup the unsealed management packs only, then use the following (this one will be what most people will probably want to use):

Get-SCOMManagementPack | where {$_.Sealed -eq $false} | export-SCOMmanagementpack -path C:\MPBackups

Now, I could be creative and go through all of the steps required to create an automated task with SCOM 2012 or SCORCH 2012 to run this on a daily basis, but instead, I'll point you in the direction of an excellent series on backing up your SCOM environment from start to finish that was written by a System Center buddy of mine called 'Dieter Wijckmans'.

Check out his posts from the link below and make sure to use the script modifications above if you are backing up your new System Center 2012 Operations Manager environment:

http://scug.be/blogs/dieter/archive/2011/06/22/scom-2007-how-to-backup-your-environment.aspx

Enjoy!

Come along to the Official Irish Launch of Microsoft System Center 2012!

The official Irish and Northern Irish launches for System Center 2012 have been confirmed by Microsoft Ireland for March 22nd in Dublin and March 27th in Belfast.

I've been asked to present a session as one of four speakers alongside the presenting talents of Aidan Finn (MVP Virtual Machine), Damian Flynn (MVP Cloud and Datacenter Management) and Paul Keely (MVP Cloud and Datacenter Management)!

Each event is a full day out and kicks off at 10:00 until 17:00. The Dublin event is being held in the Berkley Court Hotel and the Belfast event is being held at the Hilton Hotel.

Here's the agenda for the day:


Time
Session
10:00 – 10:30
Event Registration
10:30 – 11:30
Hear how Microsoft takes the experience of running the largest datacentres in the world and applies it to scalable management solutions for customers worldwide
11:30 – 12:00
Damian Flynn from Lionbridge Technologies shares the cost savings and efficiencies achieved from implementing System Center
12:00 – 13:00
Lunch
13:05 – 16:15
Real-world examples from Industry Experts
Demonstration based sessions sharing scenarios that you can take and apply to your business. Examples include Deep Application Insights, Cloud and Data Centre – Automation and managing from the desktop to the datacentre


And here's the BIO's for each of the speakers:

Subject Matter Experts

Aidan Finn (MVP - Virtual Machine), works for MicroWarehouse Ltd as a technical sales lead, working with Microsoft partners on Hyper-V, System Center and Forefront opportunities. He has been working with systems management technologies since 1996, and is experienced with Windows Server, desktop deployment and management, System Center, virtualisation, and so on. He blogs on http://www.aidanfinn.com, tweets as @joe_elway, and has written or contributed to books such as Mastering Hyper-V Deployment and Mastering Windows 7 Deployment.

Damian Flynn (MVP – System Center Cloud & Data Centre), works for Lionbridge Technologies (a Localisation, Logo Certification, Search & Content Services Company) as a Technical Architect of Corporate IT Infrastructure, working with the Business Stakeholders, IT Team, and Partners. Damian is a member of the Microsoft Windows Sever Futures Council, actively participating in multiple Microsoft TAP programs, and has being working on infrastructure technologies since 1994, with a high level of experience in Networking, Storage, Linux and Windows Servers, Virtualisation, System Center, etc. He blogs on http://www.damianflynn.com, tweets from time to time on @damian_flynn, and is a contributing author on the forthcoming book “Microsoft Private Cloud Computing”.

Kevin Greene (Subject Matter Expert – Microsoft System Center Operations Manager), works for Ergo Group Ireland. Kevin has been responsible for the deployment of a large number of System Center projects to enterprise level clients across all sectors. He blogs at http://kevingreeneitblog.blogspot.com and you can also find him on Twitter as @kgreeneit

Paul Keely (MVP – System Center Cloud & Data Centre), Paul has been working with System Center in its original from form for nearly ten years. He works for Infront Consulting group, a specialist system center practice that deploys system center to some of the biggest companies in the world.


You can register for the event on the Irish IT Pro website by clicking on the link below:

http://blogs.technet.com/b/ieitpro/archive/2012/02/21/system-centre-2012-launch-events-in-dublin-and-belfast.aspx

Registration places have already been filled so hurry up before it's booked out and I hope to see you there!!

Monday, February 13, 2012

SCOM 2012 - The Upgrade Helper Management Pack

Following on from my last post on creating a custom RDP alert task in SCOM2012, this is a quick post to demonstrate the new SCOM 2012 Upgrade Helper Management Pack that assists in the in-place upgrade of your SCOM 2007 R2 environment to SCOM 2012.

The in-place upgrade process is real easy but it's important that a number of installation steps are carried out in an exact sequence, otherwise you end up making a whole lot of extra work for yourself!

This is where the SCOM 2012 Upgrade Helper Management Pack comes in handy. Once it's installed onto your SCOM 2007 R2 RMS, you can then open it up and review which servers and agents are next to be upgraded to SCOM 2012 as per the upgrade best practices.

To install the Upgrade Helper Management Pack, firstly download the SCOM 2012 Release Candidate from the link below:

http://technet.microsoft.com/en-ie/evalcenter/hh505660.aspx

Once you have downloaded the Release Candidate, run the 'SCOM2012.exe' file and expand the contents to a location of your choosing.

Now browse to the location that you expanded the files to and double click on the 'Management Packs' folder as in the screen below


When you go into the 'Management Packs' folder, you should see the 'OperationsManager.Upgrade.mp' file inside. This is the file that we will be importing into SCOM 2007R2 to assist with the upgrade process.


To import the Management Pack, on your SCOM 2007R2 Root Management Server (RMS), go to the 'Administration' tab and then right mouse click on the 'Management Packs' link in the window on the left hand side. From the drop down menu, select 'Import Management Packs' to open the wizard


In the 'Import Management Packs' wizard, click on the 'Add' button and then select 'Add from disk'


Browse to the location that you exported your SCOM2012 media to and ensure you open up the 'Management Packs' folder. When here, locate and then double click on the 'OperationsManager.Upgrade.mp' file


Back in the wizard, ensure that the management pack is ready to import and then click on the 'Install' button to begin the short installation process


Once the Management Pack install is complete, you should see a status of 'Imported' in the window. Click on the 'Close' button to complete the import process.


Now, go back to the 'Monitoring' tab and you should see a new folder called 'Operation Manager Upgrade MP'. When you expand this folder, you will see 5 steps listed that will show the relevant management servers, gateway servers, Windows agents, Unix/Linux agents and RMS and databases that need to be upgraded and the order that the upgrade needs to be carried out in.


If your server/agent has a yellow exclamation symbol beside it within one of the steps, then this server or agent hasn't yet been upgraded to SCOM2012 and needs to be done. If the server/agent shows a green symbol beside it, then it has already been upgraded to SCOM2012 and you can move onto the next step of the upgrade process.

In a small environment, this MP may not be of much use as the step by step process is easier, the less servers and agents you have. However, in a large environment such as the one I just upgraded last weekend where you have a number of different SCOM Management Servers, Gateway Servers, Cross Platform and Windows agents, then you will definitely get some benefit from first deploying it as an assistant to your upgrade.

Thursday, February 9, 2012

SCOM 2012 - Run Remote Desktop from any alert in the Console

It has been a real busy few weeks for me in work and I've hardly had any time to blog/tweet about System Center 2012 since the middle of January!

Since my last post, I've been working on a mixture of System Center and Hyper-V projects both day and night so a severe lack of sleep distracted me from posting this really neat trick I've worked out to make managing and resolving alerts in SCOM much easier from the console.

The steps outlined in this post although referencing System Center 2012 Operations Manager, will work exactly the same for System Center Operations Manager 2007 R2.

I was working on System Center 2012 Operations Manager (SCOM) yesterday and was tuning out some alerts generated by some new management packs I had deployed when I found myself having to logon to the servers generating the alerts using Remote Desktop quite regularly.

Now, if the alert generated in SCOM is from the 'Windows Server Operating System' management pack, then this management pack comes with some built in 'Tasks' that can be run from the 'Tasks/Actions' menu on the right hand side of the screen.

These tasks can be seen from the Monitoring window below once you have clicked on an alert in the Console that was generated by the Windows Server OS MP


A closer look shows us all of the available tasks that we can run under this context


As we can see from above, one of these Windows Server Operating System Management Pack tasks is the ' Remote Desktop' task

When you click on the 'Remote Desktop' task, it then opens up the RDP application (mstsc.exe) with the computer name of the server that generated the alert in SCOM and all you have to do is click once to connect to the server to carry on your troubleshooting and alert tuning.

Now, this is all well and good if you are troubleshooting an alert that is related to the Windows Server Operating System Management Pack. What if the alert has been generated by another Management Pack? The answer is simple enough - you don't get the Remote Desktop task!!

The screenshots below show an example of the different tasks/actions that come with the SQL Management Pack




The tasks that come with the SQL Management Pack are specific to SQL Server troubleshooting and completely different to the Windows Server Operating System Management Pack tasks. Although the Management Pack specific tasks are really helpful and can assist in resolving most alerts quickly, if I wanted to Remote Desktop to the SQL server generating the alert above, I would either have to initiate an RDP connection myself from the 'Run' command using 'mstsc.exe' or if I wanted to use SCOM to initiate the RDP connection, I'd have to browse to the 'Windows Server' view or the 'Discovered Inventory' view to kick off the connection.

I just found having to carry out these extra steps on a constant basis was getting to be a bit of a pain and I started out looking for a solution to enable the RDP connection from any alert within the SCOM Console irregardless of the Windows Server OS Management Pack.

The solution to this problem is to create our own custom RDP task that will run independently of any management pack but with the same parameters as the 'Windows Server OS MP' RDP task.

To begin creating the new task, open up the System Center 2012 Operations Manager Console and click on the 'Authoring' tab from the wunderbar down the bottom left hand side.

Now click on 'Tasks' on the left hand side and then 'Change Scope' from the middle of the screen and modify the search scope to be just 'Windows Server'

You should see all of the tasks associated with the 'Windows Server Operating System' Management Pack as below


Double click on the 'Remote Desktop' task in the central window and have a look at the pre-defined parameters



Copy the text from the 'Application' line in the window above into a text editor such as Notepad and you should have a line like this:

%windir%\system32\mstsc.exe

Note that the 'Parameters' line of the screen above has a specific parameter that defines the 'Microsoft.Windows.Computer' class. There's no point in copying this line to your text editor as it won't work when we go to create our new custom RDP task.

Close the RDP task properties that's open from above and then select the 'Create New Task' option from either the 'Task' menu on the right hand side or by right mouse clicking on the 'Tasks' link on the left hand side.

When the 'Create Task Wizard' opens up, click on the 'New' button to create a new custom unsealed management pack so as to store the new custom task


Input a name and description into the relevant fields for the custom unsealed management pack and then click 'Next'


In the final screen of the 'Create a Management Pack' wizard, click on the 'Create' button and you will then return to the 'Create Task Wizard' screen with your new unsealed management pack selected as a destination as shown below.


Make sure you select the 'Alert Command Line' option under 'Console Tasks' and then click 'Next' to continue

From the screen below, enter a task name such as 'Run Remote Desktop' (try not to name it simply 'Remote Desktop' as you may get mixed up at a later date if you are trying to troubleshoot issues with this task or the original 'Remote Desktop' task from the 'Windows Server OS' MP. Type a description and then click 'Next' to continue


Now, it's at this step that you will run into problems (as I did when I got to this point initially!), if you don't enter in the information exactly as I specify.

In the 'Application' field, copy the text path to your RDP application from your text editor that you had saved earlier and you should have something like:

%windir%\system32\mstsc.exe

I ran into problems when trying to find a parameter that would work that could automatically add in the computer name reference that was generating the alert in the SCOM Console once the RDP connection prompt opened up. Thankfully after loads of searching and reading up on SCOM powershell commands, I came up with the 'secret sauce' solution to make this work!!

If you want to run the 'mstsc.exe' application while specifying a server, you need to use the /v:servername switch. However as we won't be entering in a new server name manually each time we fire up an RDP connection, I needed to find the correct reference that SCOM uses and I came across $MonitoringObjectPath$

With the above syntax worked out, all we need to type into the 'Parameters' field is the following:

/v: $MonitoringObjectPath$


The last setting we need to make in the screen above is to de-select the 'Display output when this task is run' option and then click on the 'Create' button to complete the process

Now, if you go back to the 'Monitoring' tab of the SCOM Console and click on any alert, you should now see an additional 'Alert Tasks' menu on the right hand side of the screen with an entry for 'Run Remote Desktop' as the two screens below show.



This new 'Alert Tasks' menu will appear above the specific management pack tasks menu every time you click on an alert. The example above shows the 'SQL' specific tasks along with the new 'Alert Tasks' option and the screen below shows the 'Windows Server 2008 Logical Disk Tasks ' also with the new 'Alert Tasks' option above it.


If the alert that is being generated in the SCOM Console has been generated by a Windows Server with the SCOM agent installed, then your new 'Run Remote Desktop' custom task will run every time making it nice and easy to troubleshoot and keeping all administrative duties within the single SCOM Management Server.