Deprecated: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /www/collab365_296/public/wp-includes/functions.php on line 7025

Deprecated: str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /www/collab365_296/public/wp-includes/functions.php on line 2162

Deprecated: Hook imagify_allow_picture_tags_for_webp is deprecated since version 2.2! Use imagify_allow_picture_tags_for_nextgen instead. in /www/collab365_296/public/wp-includes/functions.php on line 5758
How to backup a SharePoint solutions with PowerShell - Collab365
Deprecated: strstr(): Passing null to parameter #1 ($haystack) of type string is deprecated in /www/collab365_296/public/wp-includes/functions.php on line 1145

Deprecated: stripos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /www/collab365_296/public/wp-includes/functions.php on line 1152

Deprecated: stripos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /www/collab365_296/public/wp-includes/functions.php on line 1155

Deprecated: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /www/collab365_296/public/wp-includes/functions.php on line 1162

Deprecated: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /www/collab365_296/public/wp-includes/functions.php on line 1165

Deprecated: strstr(): Passing null to parameter #1 ($haystack) of type string is deprecated in /www/collab365_296/public/wp-includes/functions.php on line 1145

Deprecated: stripos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /www/collab365_296/public/wp-includes/functions.php on line 1152

Deprecated: stripos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /www/collab365_296/public/wp-includes/functions.php on line 1155

Deprecated: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /www/collab365_296/public/wp-includes/functions.php on line 1162

Deprecated: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /www/collab365_296/public/wp-includes/functions.php on line 1165

Warning: Undefined array key "url" in /www/collab365_296/public/wp-content/plugins/thrive-visual-editor/thrive-dashboard/inc/smart-site/classes/class-tvd-smart-shortcodes.php on line 85

2014-09-04

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)

About the author 

Chendrayan

Summit Bundle

Get 200+ hours of Microsoft 365 Training for 27$!

Master Office 365, Power Platform & SharePoint & Teams With 200+ Hours Of Training Videos and 108 Ebooks in the Collab365 Academy. This offer is insane and is only available for a limited period.