ProjectWise PowerShell Performance / Function call hangs for 20 seconds

Hi,

Why PowerShell pwps_dab function call that hangs for 20 seconds, every 30 seconds  ?

please find here by a code snippet to reproduce the behavior : 

$res = New-PWLogin
    if ($res){
    $startDate = Get-Date
    Write-Host "[$($startDate)] START"
    while (((Get-Date) - $startDate).TotalMinutes -lt 2){
        $beforeCall = Get-Date
        $ver = Get-PWActiveServerVersion
        $afterCall = Get-Date
        if (($afterCall-$beforeCall).TotalSeconds -gt 5){
            Write-Host "[$($beforeCall)] Call Delay : $(($afterCall-$beforeCall).TotalSeconds) $($ver)"
        }
    }
    Write-Host "[$(Get-Date)] END"

    Undo-PWLogin
}

Result

Best regards,

Gabriel

Parents Reply Children