HOW-TO Guides

Welcome to the HOW-TO section of SystemCenterForum. Here you'll find tutorials for a variety of System Center solutions products, including MOM 2005, Operations Manager 2007 and System Center Essentials.

How to convert your Virtual PC images to Hyper-V [Tools]

I was looking for a quick way to convert my OpsMgr Virtual PC 2007 VM’s to Hyper-V a few weeks ago. What I found was a free tool called the VMC to Hyper-V Import Tool. The tool essentially allows you to open your VMC file, update paths to drives, add/remove mounted media, resource settings, etc. It then imports the VM into Hyper-V Manager. It made the job pretty easy, allowing me to make the transition in only a  few minutes time.

On the negative side, the tool seems a bit buggy, but hey, it’s free. The paths to drives and media must be correct for the convert and import to work. The tool threw some .NET exception errors that required I start over a couple of times, but went away when I updated all drive paths to correct values. Matt definitely deserves some thanks for taking the time to put this together.

 

Where to get it

You will find a download link for the VMC to Hyper-V Import Tool on MattHij’s blog, as well as detailed features and instructions for use at the URL below:

http://blogs.technet.com/matthts/archive/2008/09/12/vmc-to-hyper-v-import-tool-available.aspx

Powershell Tip: Automate periodic testing of connector availability in OpsMgr 2007

A while back, I received an email request from an admin using our Notifcation Test MP to trigger alerts not only to test end-to-end notification, but to test alert forwarding through the Engyro TEC connector. Without getting into verbose detail, the Notification Test MP implements a task named “Notification Test” that is targeted to the Health Service Class. It logs an event which generates a critical alert, which triggers notification. (Read more about the MP HERE).

But our admin wanted to kick things up a notch. His request in this case was very straightforward:

How can I run the ‘Notification Test’ task every few hours on a schedule to periodically test my Engyro TEC connector?”

His idea was that this would serve as sort of a ‘connector heartbeat’ of sorts. Interesting solution for sure. At a more basic level, the request is simply “how does one execute a task on demand or on a schedule?”. Not surprisingly, Powershell comes to the rescue here. We can use a simple Powershell script to call the “Notification Test” task.

How to make it happen

Here’s a quick study on how to call an agent task from Powershell and specify the computer on which you’d like it to run. 

  • Save the sample script below to a file with a .ps1 extension. 
  • Update the following variables at the top of the script:
    • Be sure to change the name of the RMS assigned to the $rootMS variable.
    • If it’s not the “Notification Test” task you’re interested in running, simply change the name of thename assigned to the $taskName variable.
    • Finally,  specify the name of the computer on which the task should run in the $mycomputer variable.
  • Using the Task Scheduler in Windows, schedule the script to run at the desired interval. 
   

#———-begin sample script————-

$rootMS = “myrms.contoso.com”

$taskName = “Notification Test”

$mycomputer = “mycomputer.contoso.com”

#Initialize the OpsMgr Provider

add-pssnapin “Microsoft.EnterpriseManagement.OperationsManager.Client”;

set-location “OperationsManagerMonitoring::”;

#set Management Group context to the provided RMS

new-managementGroupConnection -ConnectionString:$rootMS;

set-location $rootMS;

#Change to the All Computers Group

cd Microsoft.SystemCenter.AllComputersGroup 

#Change to the path of the computer where you want to run the task (this task is targeted to the computer)

cd $mycomputer

#Create a variable to hold the task you want to start.

$task = Get-Task | where {$_.DisplayName -eq “$taskName”} 

#The Start-Task Cmdlet will block until the task it is complete unless you start asynchronously

 Start-Task -Task: $task -Asynchronous

#———-end sample script————-

 

If this calls to mind any ideas or questions, please leave them as a comment on this post.

OpsMgr 2 Minute Tune-up: OpsMgr 2007 tips in 2 minutes or less [blog series]

In this series, some of the guys are going to help me out with a how-to series targeted at Operations Manager 2007 tuning tips that can be digested in just a minute or two.

Areas we’ll focus on will include:

  • Management Pack Configuration Tips
  • Optimizing Console Performance
  • Automation Tips (Powershell) 
  • Console Tweaks and Tuning 

Look for posts in this series to start later this week.

How to create a 2-State Monitor with VBScript [tutorial]

This detailed tutorial describes how to create a Timed Script Two State Monitor in step-by-step detail, using sample scripts available for download from System Center Forum. The detailed steps provided and additional references and additional learning material on OpsMgr scripting make it easy to reuse this example with your custom scripts based on these examples.

Download: How to Create a Script-based Two State Monitor

NOTE: The intended audience is Operations Manager 2007 administrators with at least a basic understanding of the Operations console. No scripting knowledge or experience required.

KB942863: How to collect and monitor UNIX Syslogs in OpsMgr or SCE 2007

Here’s one to add to your favorites. This article not only describes to how use the Syslog provider, but more importantly provides a detailed list of Facility values, Severity values, and Alert strings so you can generate alerts based on very granular criteria.

Check it out HERE.

Using Property Bags with Custom Scripting in Operations Manager 2007

Most Administrators using MOM 2005 had custom scripts to perform various actions that MOM 2005 could not do out of the box. One of the various actions that was very popular was logging performance. You can still do this in Operations Manager 2007, but you have to use Property Bags to achieve this. We have created a document that goes over Property Bags and a couple of different ways to use them. In particular, we have found at least one undocumented method that allows scripts to log multiple Property Bags.

Check out the first installment in the SystemCenterForum Operations Manager Scripting Series, “Using the Property Bag in Custom Operations Manager 2007 Scripts”, HERE.

We have also created a custom management pack following the examples in the article. Download the “Multi-Host Ping MP”, with alert and response performance collection from HERE.

HOW-TO Document Link

Property Bags and Custom Scripting in Operations Manager 2007

CUSTOM Performance Collection MP

Multi Host Ping Performance Collection

Agentless Exception Monitoring Walkthrough

A brief functionality overview and step-by-step installation guide for the AEM function in Operations Manager 2007.

Download the guide HERE.

Ops Mgr 2007 Gateway Scenario Document Updated

We have updated the Gateway Scenario document due to some changes in RTM version of Ops Mgr 2007. Specifically, Active Directory is no longer required for the Gateway Server to function. The title of the document has changed to Gateway Server and Certificate-based Authorization Scenarios in Operations Manager 2007 and you can download the document at the link below.

http://systemcenterforum.org/wp-content/uploads/OpsMgr2007_Gateway_Config_v1.2.zip

Responding to Alerts via Email in MOM 2005

01/17/2007 - David Wallis of the U.K (www.wallis2000.co.uk) has written an application, called the MOM Email Service,? that allows MOM administrators to acknowledge and resolve alerts via email.

Read more HERE.

Download the application and installation guide HERE.

privacy policy | terms of use | copyright © 2008 pete zerger