If ((Get-PsSnapin |?{$_.Name -eq "Microsoft.SharePoint.PowerShell"})-eq $null)
{
   	Write-Host "- Loading SharePoint Powershell Snapin"
 	Add-PsSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue | Out-Null;
}

Export-SPPList `
    -SourceUri "http://hostname/sites/site1/Shared Documents" `
    -TargetUri "SharedDocuments.zip" `
    -IncludeVersions
