Occasionally, within a ProjectWise datasource, files can go missing on a server (file storage area) or files are not deleted properly from a dms folder on a server causing an error when attempting to delete a ProjectWise folder.
With the release of PWPS_DAB module version 22.214.171.124, we have improved the existing Get-PWStorageAreaReport cmdlet to allow for skipping certain tasks to expedite the reporting process. We also have a new cmdlet, Get-PWMissingStorageAreaFiles, which scans a project or an entire datasource and reports on any missing files.
NOTE: You will need to have access to the file storage area(s) in order to run either of these cmdlets. If you do not, you may receive incorrect data.
First things first. Take a look at the help for the Get-PWStorageAreaReport and Get-PWMissingStorageAreaFiles cmdlets to familiarize yourself with the available parameters, etc.
Get-Help Get-PWStorageAreaReport -Full Get-Help Get-PWMissingStorageAreaFiles -Full
The Get-PWStorageAreaReport cmdlet generates a report listing only the discrepancies found within the folder path, storage area, or entire datasource depending on the parameters supplied. We have added two new parameters which allow for certain time consuming tasks to be skipped, thus helping to expedite the processing. Both are switch parameters, so when included the corresponding task will be skipped.
- When included, skips the file size check.
- When included, skips the check for orphaned files.
The following are a couple examples on using the Get-PWStorageAreaReport cmdlet with the new switch parameters.
#The following will create a storage area report for an entire datasource. Skipping the file size check. Get-PWStorageAreaReport -OutputFolder 'D:\Reports' -SkipFileSizeCheck -Verbose #The following will create a storage area report for an entire datasource. Skipping the orphaned file check. Get-PWStorageAreaReport -OutputFolder 'D:\Reports' -SkipOrphanCheck -Verbose
The following table is an example of the report output.
The Get-PWMissingStorageAreaFiles cmdlet returns an array of ProjectWise document objects for any discrepancies found within the folder path supplied or the entire datasource. This cmdlet does not have any required parameters, but does have two optional parameters we will take a look at.
- The folder path of a ProjectWise folder to report on.
- When UseAdminPaths in included, the UNC path to the files will be used.
- Use this option when running this cmdlet remotely.
<# The following will return ProjectWise document objects for any discrepancies found within the entire datasource. #> $MissingDocs = Get-PWMissingStorageAreaFiles -UseAdminPaths -Verbose <# The following will return ProjectWise document objects for any discrepancies found within the specified project. #> $MissingDocs = Get-PWMissingStorageAreaFiles -FolderPath 'Projects\123456 - MyNewProject\' -UseAdminPaths -Verbose
The following is a sample output for this cmdlet. Notice the $MissingDocs variable contains an array of 6 ProjectWise document objects.
Experiment with it and have fun.
Hopefully, you find this useful. Please let me know if you have any questions or comments.