Backing Up SCOM Custom Management Packs Automatically With Folder Structure

Originally posted by Connor McCardle I was asked by a customer to create a simple automated backup method to ensure their custom SCOM management packs were backed up, but also whilst keeping a sensible folder structure. This ended up being a simple PowerShell script which was ran on a schedule using Task Scheduler on one of the management servers. One of the requests was to give a folder structure like this: \<date>\<management pack name>\<management pack version>\. The following PowerShell script is what we used to achieve this: #### Import-Module OperationsManager Get-ChildItem “E:\Management Packs\Backups\Overrides” |? {$_.psiscontainer -and $_.lastwritetime -le (get-date).adddays(-7)} |% {remove-item $_ -force -Recurse} $date = date -Format dd-MM-yyyy $csv = “E:\Manag...

Lost Password