Requirement
- We need to export all our solutions from Test Environment to Production Farm.
- We need to have a Solutions back up folder in both the farm
Environment
- SharePoint 2010
- PowerShell 2.0
- Windows 2008 R2
Solution
PowerShell
<#
.Synopsis
SharePoint 2010 farm Solutions Back up
.DESCRIPTION
This Script will help SP Admins to back up all WSP files in Folder as a backup.
We can deploy directly from the back up or can be used as required.
.EXAMPLE
Backup-SPSolutions -FolderPath C:\Temp -FolderName 'SPFarmSolutions'
.Contact
chendrayan.exchange@hotmail.com
#>
Begin
{
Write-Host "Backing Up SharePoint Farm Solutions..." -ForegroundColor Yellow
New-Item $FolderPath\$FolderName -ItemType Directory -Force
Set-Location $FolderPath\$FolderName
Start-Sleep 2
}
Process
{
(Get-SPFarm).Solutions | %{$Solutions = (Get-Location).Path + "\" + $_.Name; $_.SolutionFile.SaveAs($Solutions)}
}
End
{
Write-Host "SharePoint Farm Solutions are backed up...." -ForegroundColor Yellow
Invoke-Item $FolderPath\$FolderName
}
Download : Backup SharePoint Solutions Using PowerShell
(Visited 124 times, 1 visits today)
