New-PSDrive -Name: Monitoring -PSProvider: OperationsManagerMonitoring
$all_mps = get-managementpack
foreach($mp in $all_mps)
export-managementpack -managementpack $mp -path "[backup path]"
Replace the following (including the brackets):
[rms]with the name of your RMS server (2 locations in script)In powershell, run the following command:
with the path where the backups should be written to e.g. c:\backups\
set-executionpolicy remotesignedThis command sets your run permissions on your powershell scripts so you can run any locally created powershell script. Downloaded powershell scripts still need to be signed.
Save the script as a .ps1 file.
You can now schedule it through task scheduler as follows:
C:\WINDOWS\system32\windowspowershell\v1.0\powershell.exe powershell "full path to your powershell script, including the script name"
C:\WINDOWS\system32\windowspowershell\v1.0\powershell.exe powershellThe script will export all management packs, sealed and unsealed, creating an XML file for each. Currently, the script will overwrite any existing files in the location specified