I am trying to archive a ProjectWise project using PowerShell, I have the correct document count of 5 documents, and the correct document number of 5 in the statistics. But the export returns over 75000 documents being exported and not 5 as expected, and I stopped it after running 24hrs. What could be causing this?
# please note that the project is in a subfolder and not directly under the documents folder$ProjectToArchive = 'Hatch Internal\SiteABC\H999995'$Path = 'C:\Temp\Export\PWArchive'
# this returns the correct count of the 5 documentsif($ProjectToArchive.Length -gt 0) { $pwDocs = Get-PWDocumentsBySearch -FolderPath $ProjectToArchive -GetAttributes}
# Use splatting$Export = @{ OutputFolder = $Path; ProjectWiseFolder = $ProjectToArchive; OutputFileName = "H999995.sqlite";}
# this returns over 75000 documents being exported and not 5 as expected, and I stopped it after it was running for 24hrsExport-PWDocumentsToArchive $Export -verbose
Kind regardsGavin Chapman
Gavin,
What happens if you run Export-PWDocumentsToArchive -OutputFolder $Path -ProjectWiseFolder $ProjectToArchive -OutputFileName "H999995.sqlite" ?
I'm wondering if the path isn't being set correctly using the method above..
Paul
Answer Verified By: GChapman
Thanks Paul, this does indeed return a better result.