I wanted to orchestrate the backup of these management packs so that any modifications would not be lost, so I wrote a script to find any unsealed management packs and export them to a unc path. Here's the script:
<# .SYNOPSIS – Backup management packs in a OpsMan 2012 Environment .DESCRIPTION – This script is run on a schedule and is used to backup unsealed SCOM Managementpacks. .PARAMETER OpsManServer - FQDN of Operations Manager Management server .PARAMETER BackupPath - UNC path to backup management packs .PARAMETER OpsManCredential - PSCredential object for account with rights on OpsMan Server #> Param ( [string]$OpsManServer, [string]$BackupPath, [PScredential]$OpsManCredential ) Try{ # Import OperationsManager module Import-Module OperationsManager # Open persistent connection to Operations Manager Management Server New-SCOMManagementGroupConnection -ComputerName $OpsManServer -Credential $OpsManCredential | Set-SCOMManagementGroupConnection # Get All unsealed MananagementPacks (assume these are custom) $CustomMps = Get-SCOMManagementPack -ComputerName $OpsManServer -Credential $OpsManCredential | where {$_.sealed -eq $false} # Export each MP to the specified path ForEach ($CustomMP in $CustomMPs){ Export-SCOMManagementPack -ManagementPack $CustomMP -path $BackupPath } # Close Connection to OpsMan Server Get-SCOMManagementGroupConnection | Remove-SCOMManagementGroupConnection } Catch{ Write-Error -Message "Failed to backup managment packs on $OpsManServer" Write-Error -Message $error $Result = "Failed to remove a SCOM Agent for $SCOMClientName from Managment Server $SCOMManagementServer" } $Result