SCOM 2012 Powershell Script to Backup Unsealed Management Packs

Sure there’s plenty out there already. But my does it out of the box. Run it from wherever on the management server and it will create a folder called C:\UnsealedBackup\<date> and dump the unsealed management packs in there. Nice and neat, run it every day after you eat your Wheaties. Or just schedule it with Task Scheduler. But either way, Wheaties are tasty.

# Written by J. Clarke to automated the backup of unsealed management packs.
# Version 1.0
Import-Module OperationsManager
$Date = Get-Date -Format “yyyy-MM-dd”
$TodaysFolder = “C:\UnsealedBackup\” + $Date
New-Item $TodaysFolder -type directory -force
Get-SCOMManagementPack | where {$_.Sealed -eq $false} | export-SCOMmanagementpack -path $TodaysFolder

Advertisements
Posted in Powershell, SCOM 2012

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Papers
People
Map

Enter your email address to follow this blog and receive notifications of new posts by email.

Join 32 other followers

%d bloggers like this: