Is there a reason the Get-PWStatistics cmdlet is so slow? Bringing up the statistics list in ProjectWise Administrator is pretty quick, but the cmdlet can take multiple minutes to run. Larger datasources are slower than smaller ones so I assume it's calculating something per user or per document but I don't see what. Also for repeated calls the subsequent calls seem quicker. Perhaps an option to disable this calculation if it isn't important?
Also, for Update-PWStatistics should the call pause until the update completes (which seems to be the intent) or just trigger the call and immediately return (which doesn't happen). I'd prefer the 2nd method because on our larger datasources the update takes so long it times out the connection and throws an error. An option -ReturnImmediately maybe?
The error I get on Update-PWStatistics is (this was after 20 minutes):
Update-PWStatistics : Refresh statistics failed with error 55502
Get-PWError reports error 55502 as:
Error 55502: Invalid socket. The connection to the remote host is broken.