When I run the Get-PWDocumentsBySearch without the -GetVersionsToo.
How come I get all version? I would expect, that I only got all current versions.
Get-PWDocumentsBySearch -SearchName $ProjectPath -GetAttributes
Managed to solve this one ;-)
Added the 'Search only current document version' in the Saved Search for each document.