My PWPS_DAB version is 126.96.36.199. I executed the Get-PWFolderDocumentSize cmdlet on a rich project folder and the results are not the same as the statistics from properties for that folder.
Your method doesn't include files in the root folder ($ProjectFolder), possible there is a few files in it?
I believe this has been resolved in the later version of the PWPS_DAB module. I tested in version 188.8.131.52 and it is returning the correct value in bytes.
PWPS_DAB version: 184.108.40.206
Getting the below with a valid folder variable:
Get-PWFolderDocumentSize -InputFolder $folderGet-PWFolderDocumentSize : Unable to cast object of type 'System.Management.Automation.SwitchParameter' to type 'System.IConvertible'.Couldn't store <False> in AllDocumentsInTree Column. Expected type is Boolean.At line:1 char:1+ Get-PWFolderDocumentSize -InputFolder $folder+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (:) [Get-PWFolderDocumentSize], ArgumentException + FullyQualifiedErrorId : System.ArgumentException,PWPS_DAB.GetPWFolderDocumentSize
This issue has been resolved. You will need to update to the latest version of the PWPS_DAB module.