I have some problem to list connected users and disabled users in powershellthe result is ? for all users; logical and domain users : PS > Get-PWUserUserID 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} }}
-
Ludovick LAGREVOL
Projectwise Administrator