Command
Export-List
Description
The command to export lists or libraries from a SharePoint site to a file share. This command is the equivalent of using Download on a list or library in Explorer.
Index
Examples
Get lists to export
$srcSite = Connect-Site "http://myfarm1/sites/mysourcesite" $srcLists = Get-List -Site $srcSite Export-List -List $srcLists -DestinationFolder "G:\MyDestinationFolder"
Export all lists
$srcSite = Connect-Site "http://myfarm1/sites/mysourcesite" Export-List -SourceSite $srcSite -All -DestinationFolder "G:\MyDestinationFolder"
Export some lists
$srcSite = Connect-Site "http://myfarm1/sites/mysourcesite" Export-List -SourceSite $srcSite -Name MyTitle*,MySpecificTitle -DestinationFolder "G:\MyDestinationFolder"
Note: The * symbol is used to call multiple objects with a similar name.
Export some lists and do not preserve version history
$srcSite = Connect-Site "http://myfarm1/sites/mysourcesite" Export-List -SourceSite $srcSite -Name MyTitle*,MySpecificTitle -DestinationFolder "G:\MyDestinationFolder" -NoVersionHistory
Note: The * symbol is used to call multiple objects with a similar name.
Syntax
Export-List-List <List[]>-DestinationFolder <Uri>[-NoVersionHistory <SwitchParameter>][-VersionLimit <Int32>][-FlattenFolders <SwitchParameter>][-TaskName <String>]
Export-List-All <SwitchParameter>-SourceSite <Site>-DestinationFolder <Uri>[-NoVersionHistory <SwitchParameter>][-VersionLimit <Int32>][-FlattenFolders <SwitchParameter>][-TaskName <String>]
Export-List-Name <String[]>-SourceSite <Site>-DestinationFolder <Uri>[-NoVersionHistory <SwitchParameter>][-VersionLimit <Int32>][-FlattenFolders <SwitchParameter>][-TaskName <String>]
Parameters
-All <SwitchParameter>
Specifies that all lists of the specified source site will be exported.
Required? | True |
Default value | None |
Accept pipeline input? | False |
Accept wildcard characters? | False |
Parameter set name | All |
Aliases | None |
-DestinationFolder <Uri>
Specifies the destination folder path. Note: This parameter cannot be used to create new folders at the destination.
Required? | True |
Default value | None |
Accept pipeline input? | False |
Accept wildcard characters? | False |
Parameter set name | (All) |
Aliases | None |
-FlattenFolders <SwitchParameter>
Specifies that folder hierarchy will be flattened when exporting.
Required? | False |
Default value | None |
Accept pipeline input? | False |
Accept wildcard characters? | False |
Parameter set name | (All) |
Aliases | None |
-List <List[]>
Specifies the list(s) to export.
Required? | True |
Default value | None |
Accept pipeline input? | True (ByValue, ByPropertyName) |
Accept wildcard characters? | False |
Parameter set name | Default |
Aliases | None |
-Name <String[]>
Specifies the name of the list(s) to export (wildcards supported).
Required? | True |
Default value | None |
Accept pipeline input? | False |
Accept wildcard characters? | True |
Parameter set name | Name |
Aliases | None |
-NoVersionHistory <SwitchParameter>
Specifies that the version history won't be preserved.
Required? | False |
Default value | None |
Accept pipeline input? | False |
Accept wildcard characters? | False |
Parameter set name | (All) |
Aliases | None |
-SourceSite <Site>
Specifies the parent site.
Required? | True |
Default value | None |
Accept pipeline input? | True (ByValue, ByPropertyName) |
Accept wildcard characters? | False |
Parameter set name | All, Name |
Aliases | None |
-TaskName <String>
Specifies a name for the task.
Required? | False |
Default value | None |
Accept pipeline input? | False |
Accept wildcard characters? | False |
Parameter set name | (All) |
Aliases | None |
-VersionLimit <Int32>
Specifies the export of the X latest version, while always conserving at least one major version.
Required? | False |
Default value | None |
Accept pipeline input? | False |
Accept wildcard characters? | False |
Parameter set name | (All) |
Aliases | None |