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.

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 documents
if($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 24hrs
Export-PWDocumentsToArchive $Export -verbose

Kind regards
Gavin Chapman

Parents Reply Children
No Data