Export-SPPItem

Top  Previous  Next

Exports SharePoint list items, documents and folders to a ZIP file.

Syntax

Export-SPPItem [-Source] <SPObjectPipeBind> [-Target] <string> [-Item <string[]>] [-DisableTransactionLimits <SwitchParameter>] [-ExcludeEmptyFolders <SwitchParameter>] [-IncludePermissions <SwitchParameter>] [-IncludeVersions <SwitchParameter>] [-Recursive <SwitchParameter>] [<CommonParameters>]

Parameters

Parameter

Required

Type

Description

Source

Yes

SPObjectPipeBind

SharePoint source location. Possible values:

SPFile or SPListItem object to export.
SPFolder object to export specified items from. Use the Item option to specify one or more items.
String object with the absolute URL address of the SPFile or SPListItem object to export.
String object with the absolute URL address of the SharePoint list folder to export items from. Use the Item option to specify one or more items.

Target

Yes

String

The file path of the destination ZIP file.

Item

No

String Array

Array of source items to export. The items can be specified by their URL, integer id or Guid. The URLs can be folder relative, site relative or server relative. Finally, it is also possible to include simple wildcards like * and *.* and *.pdf and *partialfilename*. Specify the Recursive switch parameter to also apply the wildcard(s) to items in sub folders.

ExcludeEmptyFolders

No

SwitchParameter

Do not export empty folders.

IncludePermissions

No

SwitchParameter

Includes any item level permissions in the export. Inherited permissions are not exported.

IncludeVersions

No

SwitchParameter

Includes all items versions in the export.

Recursive

No

SwitchParameter

Applies any specified item wildcard(s) recursively to items in sub folders.

DisableTransactionLimits

No

SwitchParameter

Disables the CopyMove transaction limits for the total item count and the total item size in MB that can be exported in one transaction. Use this switch when exporting large lists and libraries that exceed the transaction limits configured on the global CopyMove settings page in Central Administration. However, the transaction may as a result take a long time to complete and consume a significant amount of memory.

Examples

Exports two documents and a complete folder branch with full version history from a document library.

Export-SPPItem
 -Source "https://teams.mydomain.net/sites/site1/Shared Documents"
 -Target "SharedDocuments.zip"
 -Item "Document.docx","Presentation.pptx","FolderName"
 -IncludeVersions

Recursively exports all Microsoft Word and Microsoft PowerPoint documents with full version history from a document library.

Export-SPPItem
 -Source "https://teams.mydomain.net/sites/site1/Shared Documents"
 -Target "SharedDocuments.zip"
 -Item "*.docx","*.pptx"

 -Recursive
 -IncludeVersions