WARNING! Action described here can corrupt functionality and/or data in your PWA!
Prerequisites:
- SharePoint 2010 Management Shell
- SharePoint Farm Administrator
- PWA Site Collection Administrator
- All objects (at least fields) should have same UIDs
To perform export of configuration list please download and save Export-pwaList.ps1
- Open SharePoint 2010 Management Shell and go to script file location.
- Type next command using your own variables:
.\Export-pwaList.ps1 -pwaUrl http://<server>/<pwa> -ListName "FluentPro PDP AutoComplete" -Path <FileSystemPath>\<Filename>
For example:
.\Export-pwaList.ps1 -pwaUrl http://mysharepointfarm/pwa -ListName "FluentPro Lookup Manager" -Path c:\backup\lookupmanager.cmp
To import configuration list please download and save Import-pwaList.ps1
- Open SharePoint 2010 Management Shell and go to downloaded file location.
- Type next command using your own variables:
.\Import-pwaList.ps1 -pwaUrl http://<server>/<pwa> -Path <FileSystemPath>\<Filename>
For example:
.\Import-pwaList.ps1 -pwaUrl http://OtherSharePointFarm/pwa -Path c:\backup\lookupmanager.cmp
Scripts
Export-pwaList.ps1
Param ( [parameter(Mandatory=$true,position=0)][string]$pwaUrl, [parameter(Mandatory=$true,position=1)][string]$ListName, [parameter(Mandatory=$true,position=2)][string]$Path ) Add-PSSnapin microsoft.sharepoint.powershell -ErrorAction:SilentlyContinue if(($spweb = Get-SPWeb $pwaUrl -ErrorAction:SilentlyContinue) -ne $null) { if(($spList = $spweb.Lists[$ListName]) -ne $null) { $spListRelativePath = $spList.ParentWebUrl + "/" + $spList.RootFolder if(-not (Test-Path -Path $(Split-Path $Path))) { New-Item $(Split-Path $Path) -ItemType Directory -Force | Out-Null } Export-SPWeb -Identity $pwaUrl -ItemUrl $spListRelativePath -Path $Path } else { Write-Error "List '$ListName' does not found in URL: $pwaUrl`n" exit 1 } } else { Write-Error "PWA Site does not found by URL: $pwaUrl`n" exit 1 }
Import-pwaList.ps1
Param ( [parameter(Mandatory=$true,position=0)][string]$pwaUrl, [parameter(Mandatory=$true,position=1)][string]$Path ) Add-PSSnapin microsoft.sharepoint.powershell -ErrorAction:SilentlyContinue if((Test-Path -Path $Path)) { if(($spweb = Get-SPWeb $pwaUrl -ErrorAction:SilentlyContinue) -ne $null) { Import-SPWeb -Identity $pwaUrl -Path $Path -Force -Confirm:$false } else { Write-Error "PWA Site does not found by URL: $pwaUrl`n" exit 1 } } else { Write-Error "$Path does not exist`n" }