Connected and disabled users in projectwise with powershell

I have some problem to list connected users and disabled users in powershell

the result is ? for all users; logical and domain users :

PS > Get-PWUser

UserID UserName                                Description                             Type    SecProvider                            IsConnected IsDisabled
------ --------                                -----------                             ----    -----------                            ----------- ----------
  1    Pwadmin                                 Administrateur central                  Logical                                             ?           ?     
  2    zAdm_x                                  sSynchx                                 Logical                                             ?           ?     
  3    zAdm_xxx                                zGenex                                  Logical                                             ?           ?     
 7469  zAdm_xxx                                zFetchxx                                Logical                                             ?           ?   
 14891 s.rxx                                   RExxxxx                                 Synced  MYDOMAIN                                    ?           ?     

 
 Server is PJW Integration server 08.11.11.590 EN on windows 2012 Std US
 
 Powershell is launch from windows 2012 Server, with Projectwise Powershell module version :
 Binary     0.0.0.6    pwps                                {Add-PWGroupMember, Add-PWUserListMember, Close-PWConnection, Get-PWAsyncExtractionSchedule...}  
 
 any idea ?

script pwsh :

Clear-Host
$pwpsModule = Get-Module pwps
    if (!$pwpsModule)
        {
        Import-Module pwps
        }


foreach ( $datasource in (Get-PWDatasource) )
{
if (($datasource.HostName -eq 'xxxx.local') -and ($datasource.InternalName -eq 'zTests_xxx'))
    {

    write-host "Traitement de $($datasource.InternalName)" -BackgroundColor darkGreen

    $cnx=(Open-PWConnection -DatasourceName $datasource.FullName -UserName 'zAdm_xx' -Password 'xxxxxx' -ErrorAction SilentlyContinue)

    if ($cnx)
        {
        Get-PWUser | where { $_.IsConnected }
        Close-PWConnection
        }
        else {write-host "   -> Erreur de connection" -ForegroundColor DarkMagenta}

    }

}

Parents Reply
  • Yes, I have an idea. I'm pretty sure that some of the specifics you mention would be empty if your datasource was created before those features were added to ProjectWise, specifically if it was created before the audit trail was implemented (many years ago). Or perhaps because you have not enabled the audit trail, or those specific items to audit.

    Why "Disabled" is blank, for that I have no idea, as it is a setting that is not in the audit trail but in the table for users and be easily queried and reported on.
Children
No Data