Question: How to export and import or Save SharePoint List/Library template with data using powershell from one web application to another web application

Answer: 
<http://technet.microsoft.com/en-gb/library/ee428293(v=office.14).aspx#section1>

**To export a site, list or document library by using Windows PowerShell**

> 
> 1.Verify that you meet the following minimum requirements: See Add-SPShellAdmin.
> 
> 
> 2.On the Start menu, click All Programs.
> 
> 
> 3.Click Microsoft SharePoint 2010 Products.
> 
> 
> 4.Click SharePoint 2010 Management Shell.
> 
> 
> 5.At the Windows PowerShell command prompt, type the following command:
> 
> 
> 

```
Export-SPWeb -Identity <Site URL> -Path <Path and file name> [-ItemUrl <URL of site, list, or library>] [-IncludeUserSecurity] [-IncludeVersions] [-NoFileCompression] [-GradualDelete] [-Verbose]

```

> 
> If the , , or contain any spaces, you must surround these in double quotes
>  (“ ”) or the Windows PowerShell command will return errors.
> 
> 
> 

to import do:

<http://technet.microsoft.com/en-us/library/ee428322(v=office.15).aspx>

```
Import-SPWeb -Identity  <SiteURL>  -Path <ImportFileName>  [-Force] [-NoFileCompression] [-Verbose]

```

> 
> Where:
> 
> 
> ◦ is the URL for the site that you are importing to.
> 
> 
> ◦ is the name of the file that you are exporting from.
> 
> 
> 

the path is the saved file you generate from the exprot method. When using the method as an example:

```
Export-SPWeb -Identity http://sitetest:12345/subsite -Path C:\backup\backup.cmp
  -ItemUrl /Lists/saveThisList

```

above im exporting from site '`http://sitetest:12345/subsite'` and saving to a folder in 'c' drive 'backup' with the name and extention of 'backup.cmp' and you give the list url of the list item, in my case its under subdirectory 'lists' and called 'saveThisList' (`http://sitetest:12345/subsite/Lists/saveThisList`)

for import its simply giving the url you want to place it on (site) and the location of the stored backup item on your file system:

```
Import-SPWeb -Identity  http://sitehome:122213/subsite  -Path C:\backup\backup.cmp

```

-Force
You can use following powershell commands to import/export list:

```
 1: #This is the source web that is hosting the lists to move
   2: $sourceWebUrl = "http://server.SharePoint.Com/Sub1"
   3:  
   4: #This is the destination web, where the lists will be copied to
   5: $destWebUrl = "http://server.SharePoint.com/Sub1/forums"
   6:  
   7: #Location to store the export file
   8: $path = "\\Server\Share\"
   9:  
  10: #comma delimited list of List Names to copy
  11: $lists = @("List Number 1", "List Number 2")
  12:  
  13:  
  14: #Loop through the lists, export the list from the source, and import the list into the destination
  15: foreach($list in $lists)
  16: {
  17:     "Exporting " + $sourceWebUrl + "/lists/" + $list
  18:  
  19:         export-spweb $sourceWebUrl -ItemUrl ("lists/" + $list) -IncludeUserSecurity -IncludeVersions All -path ($path + $list + ".cmp") -nologfile
  20:  
  21:     "Exporting complete."
  22:  
  23:  
  24:  
  25:     "Importing " + $destWebUrl + "/lists/" + $list
  26:  
  27:         import-spweb $destWebUrl -IncludeUserSecurity -path ($path + $list + ".cmp") -nologfile
  28:  
  29:     "Importing Complete"
  30:     "`r`n`r`n"
  31: }

```

<http://www.c-sharpcorner.com/uploadfile/Roji.Joy/exportimport-of-sharepoint-2010-site-using-power-shell/>

<http://blogs.msdn.com/b/jorman/archive/2011/01/08/copying-lists-with-powershell-in-sharepoint-2010.aspx>