How to backup all SCOM management packs

Very simple powershell script to backup all management packs to disk.
Launch the System Center Operations Manager, Command Shell:

OpsMgr 2007 R2
get-managementpack | export-managementpack -path D:\mgmt\MPBackups

OpsMgr 2012
Get-SCManagementPack | Export-SCManagementPack -path D:\mgmt\MPBackups

The difference in the code above in comparison to the OpsMgr 2007 R2 code is that the ‘get-managementpack’ and ‘export-managementpack’ commands have been modified in SCOM 2012 to become ‘get-scmanagementpack” and ‘export-scmanagementpack’