Get-PWUserByLastLogin returning last login date 1-1-1979
$users = Get-PWUserByLastLogin -Verbose
I believe that indicates that a last login could not be found. Do you have a secondary audit trail table enabled?
No. Do you know to enable it?
It's in ProjectWise Admin, Datasource settings, Audit Trail Settings. Turn on Move truncated records to a secondary table and give it a secondary table name.
Then click the Settings button, select the User record type and make sure the Login event is set to only keep records for either a specific amount of time or number of records.
Note that you may have a database routine that purges the login events separately from these settings. Hosted datasources (at least ours) are aggressively purged because the indexing account logs in about every 30 seconds and generates tons of events (I don't see login events older than a day). We also purge our on premise databases regularly to keep the audit table under control, just not that much, I think we keep 3-6 months.
The date of 1-1-1979 is returned for all users that are not in any of the audit trail tables. You'll only see users with this date returned when you don't use the -since parameter, probably because 1979 is long before ProjectWise's inception.
Mark Weisman | Bentley Systems
Ajomon George was you able to get this to work?