25 Nisan 2012 Çarşamba

SCOM 2007: How to backup your unsealed management packs

Difference between sealed management packs and unsealed management packs.

The difference is rather simple. All the management packs you download from vendors such as Microsoft, Dell, HP,… are sealed once. They have been developed by the vendors and sealed to prevent any further customizations. These management packs often include a variety of Rules, monitors, views and even reports which are installed when you import the management pack.

All the management packs you create yourself are by default unsealed ones. In here you store all your customizations such as: overrides on the sealed management packs, custom reports, custom made rules, custom made monitors…

Notice the word “custom”… In my book the word “custom” equals a lot of time and effort are spend to create them… Don’t want to loose them in case of a disaster then!

So how do we back these up… There are basically 2 ways: Manually or automated.

Manually:


If you have one unsealed management pack that you want to backup or you want to quickly back it up while working in the console you can use the following method:

Open the console and navigate to Administration > management packs > select the management pack you wish to backup and right click > choose Export Management Pack…

scom_backup_sealedMP0000

Select a location for your backup:

scom_backup_sealedMP0001

Click ok and your management pack is successful.

scom_backup_sealedMP0002

If you check your location you’ll see the management pack in XML format.

scom_backup_sealedMP0003

While the above method works like a charm for a quick backup before changing something in your management pack it’s not workable and a hassle when you want to backup several management packs. Not to forget the human factor… You have to remember to take backups of your management packs…

Automated Backup of Unsealed Management packs


Therefore the preferred way to backup is by automating it via script using PowerShell.

Microsoft has actually gave the proper tools to do so in the powershell cmdlet set for SCOM.

The command to use:

$mps = get-managementpack | where-object {$_.Sealed -eq $false}
foreach ($mp in $mps)
{
export-managementpack -managementpack $mp -path "C:\Backups"
}

There are basically 2 approaches to automate this: SCOM scheduled rule or Scheduled tasks on the RMS itself

Hiç yorum yok: