LastUpdated date

when running the Get-PWStatistics -ForceRefresh, I have noticed that the Last Updated date is still very old

LastUpdated                : 9/11/2019 11:20:54 AM

there seems to be an error with the -ForceRefresh parameter

Get-PWStatistics : Refresh statistics failed with error 58502
At C:\Program Files (x86)\Hatch.PW.Statistics\Statistics.ps1:151 char:17
+ Get-PWStatistics -ForceRefresh -IgnoreLastLoginCount
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Get-PWStatistics], Exception
+ FullyQualifiedErrorId : Refresh statistics failed with error 58502,PWPS_DAB.GetPWStatistics

in the code below you can see that it does actually return a statistics result, but not actually doing the refresh

PS C:\windows\system32> C:\Program Files (x86)\Statistics.ps1
-------------------------------------
Get-PWStatistics : Refresh statistics failed with error 58502
At C:\Program Files (x86)\Statistics.ps1:151 char:17
+                 Get-PWStatistics -ForceRefresh -IgnoreLastLoginCount
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Get-PWStatistics], Exception
    + FullyQualifiedErrorId : Refresh statistics failed with error 58502,PWPS_DAB.GetPWStatistics
 

LastUpdated                : 9/11/2019 11:20:54 AM
TotalFileSize              : 6660433092
ACCESSCONTROL_COUNT        : 199
AFP_FPROP_DOCS_PROCESSED   : 0
AFP_FPROP_DOCS_PROCESSING  : 0
AFP_FPROP_DOCS_UNPROCESSED : 0
AFP_FTR_DOCS_PROCESSED     : 34369
AFP_FTR_DOCS_PROCESSING    : 197
AFP_FTR_DOCS_UNPROCESSED   : 0
AFP_THUMB_DOCS_PROCESSED   : 34566
AFP_THUMB_DOCS_PROCESSING  : 0
AFP_THUMB_DOCS_UNPROCESSED : 0
ATTRIBUTE_COUNT            : 134
AUDIT_COUNT                : 627068
AVG_ATTRIBUTES_PER_ENV     : 26
AVG_AUDIT_RECS_PER_FOLDER  : 2
AVG_DOCS_PER_FOLDER        : 21
AVG_DOC_FILE_SIZE          : 200097
AVG_FOLDER_DEPTH           : 8
AVG_REFERENCE_ATTACHMENTS  : 3
AVG_USERS_PER_GROUP        : 24
CHKL_REC_COUNT             : 4596
DEPARTMENT_COUNT           : 0
DOCS_NOT_PROCESSED         : 0
DOCS_PROCESSED             : 34566
DOCS_PROCESSING            : 0
DOCS_WITHOUT_THUMB         : 0
DOCS_WITH_FPROPS_COUNT     : 3416
DOCS_WITH_THUMB            : 8492
DOC_COUNT                  : 34566
EMPTY_FOLDER_COUNT         : 1292
ENVIRONMENT_COUNT          : 5
FOLDER_COUNT               : 2912
GROUP_COUNT                : 3
ITEMS_WITH_AUDIT_RECS      : 23662
LAST_UPDATED               : 1568193654
MASTERFILE_COUNT           : 136
MAX_ATTRIBUTES_PER_ENV     : 59
MAX_AUDIT_RECS_PER_FOLDER  : 127
MAX_DOCS_PER_FOLDER        : 1853
MAX_DOC_FILE_SIZE          : 957116402
MAX_FOLDER_DEPTH           : 14
MAX_REFERENCE_ATTACHMENTS  : 11
MAX_USERS_PER_GROUP        : 52
MIN_ATTRIBUTES_PER_ENV     : 1
MIN_AUDIT_RECS_PER_FOLDER  : 0
MIN_DOCS_PER_FOLDER        : 1
MIN_DOC_FILE_SIZE          : 0
MIN_FOLDER_DEPTH           : 1
MIN_REFERENCE_ATTACHMENTS  : 1
MIN_USERS_PER_GROUP        : 2
ODS_CLASS_COUNT            : 30
ORPHANED_THUMB_COUNT       : 630
POPULATED_FOLDER_COUNT     : 1620
PROJECT_COUNT              : 2902
PROPERTY_COUNT             : 83
QUERY_COUNT                : 180
RICHPROJECT_COUNT          : 10
STATE_COUNT                : 4
STORAGE_COUNT              : 8
THUMB_COUNT                : 9122
USER_COUNT                 : 8612
USERS_INACTIVE_07          : 0
USERS_INACTIVE_30          : 0
USERS_INACTIVE_60          : 0
USERS_INACTIVE_90          : 0
USERS_INACTIVE_120         : 0
VIEW_COUNT                 : 5
WORKFLOW_COUNT             : 2
TOTAL_DOC_FILE_SIZE        : 6660433092
Description                : ProjectWiseStatistics
Name                       : ProjectWiseStatistics

obtained statistics for..

I am able to use the 'REFESH' button in the ProjectWise Administrator, using the same user log in that I am using in the PowerShell code.

any thoughts?

Kind Regards Gavin Chapman

Parents
  • got the solution, thank you Kevin and thank you Paul.

    it was the added parameter '-NonAdminLogin' used in the powershell login.

    also explains why it worked in the administrator console

    New-PWLogin -DatasourceName $Datasource -UserName $username -Password $SecurePassword -NonAdminLogin

    have removed the parameter, and now its working Slight smile

    New-PWLogin -DatasourceName $Datasource -UserName $username -Password $SecurePassword

    Answer Verified By: GChapman 

Reply
  • got the solution, thank you Kevin and thank you Paul.

    it was the added parameter '-NonAdminLogin' used in the powershell login.

    also explains why it worked in the administrator console

    New-PWLogin -DatasourceName $Datasource -UserName $username -Password $SecurePassword -NonAdminLogin

    have removed the parameter, and now its working Slight smile

    New-PWLogin -DatasourceName $Datasource -UserName $username -Password $SecurePassword

    Answer Verified By: GChapman 

Children
No Data