Home > Work > How to backup deployed solutions

How to backup deployed solutions

Recently I had the need to backup all the solutions deployed to a test system before a code refresh, to achieve this I used the simple piece of PowerShell below.

 

$dirName = "C:\Solutions"
foreach ($solution in Get-SPSolution)
{
$filename = $Solution.SolutionFile.Name
$solution.SolutionFile.SaveAs("$dirName\$filename")
}

 

To run the PowerShell script simply create the folder c:\Solutions, or set another location in the script and run with Farm credentials or equivalent.

 

Happy SharePointing !

Categories: Work
  1. No comments yet.
  1. No trackbacks yet.

Leave a comment

Design a site like this with WordPress.com
Get started