Sean McDonough’s Most Excellent SharePoint Backup Augmentation Cmdlets

Sean McDonough has introduced a project called SharePoint Backup Augmentation Cmdlets.  This farm-based solution adds a few new SharePoint Cmdlets to the mix:

The Cmdlets can be used together to automatically maintain a backup catalog, at the specified size or backup count.

To deploy the solution, copy the SharePointBAC.wsp to a local SharePoint Server.  Run the SharePoint Management Shell and navigate to the directory containing the SharePointBAC.wsp solution.  Run:

As an example, if we wanted to keep two backups on a file share, we would run:

This will enumerate the existing backup catalog and then remove all but the two most recent backups.

In this example, let’s say we have a requirement where we want to keep the last backup, but only if the current backup finishes without warnings or errors:

Lastly, if you want to send a status email of the last backup, we can use the Send-SPBackupStatus command with a comma-delimited list of email addresses:

If the catalog changes after you’ve set a variable for the catalog, do not forget to call $Catalog.Refresh()!.

These Cmdlets are at an Alpha 0.2 revision at the time of writing, however functionality-wise they have performed as expected so far.  I highly recommend these Cmdlets to anyone working with SharePoint’s built-in backup methods.

Leave a Reply