Bentley Communities
Bentley Communities
  • Site
  • User
  • Site
  • Search
  • User
ProjectWise
  • Product Communities
ProjectWise
ProjectWise PowerShell Extensions Forum GET-PWuser
    • Sign In

    • State Not Answered
    • Replies 8 replies
    • Subscribers 67 subscribers
    • Views 2157 views
    • Users 0 members are here

    GET-PWuser

    juanmanuel
    Offline juanmanuel over 5 years ago

    Hi, Having the 64b of the extensions is a GREAT help but, i found that the GET-PWUsers still in the 32 old library, can we get it updated to 64 bits?

    • Sign in to reply
    • Cancel
    Parents
    • Brian Flaherty
      0 Offline Brian Flaherty Wed, May 2 2018 9:56 AM

      Take a look at Get-PWUsersByMatch.

      • Cancel
      • Vote Up 0 Vote Down
      • Sign in to reply
      • Verify Answer
      • Cancel
    Reply
    • Brian Flaherty
      0 Offline Brian Flaherty Wed, May 2 2018 9:56 AM

      Take a look at Get-PWUsersByMatch.

      • Cancel
      • Vote Up 0 Vote Down
      • Sign in to reply
      • Verify Answer
      • Cancel
    Children
    • juanmanuel
      0 Offline juanmanuel Wed, May 2 2018 10:36 AM in reply to Brian Flaherty

      I want to report all the connected users and the get-pwuser**** commands included in the PWPS_dab 64b libaries are not as efficient and the old get-pwuser. old PW-PWuser takes about 3 or 4 seconds to report the connected users on a datasource while the new commands takes up to 40 seconds to get the same information. 

      • Cancel
      • Vote Up 0 Vote Down
      • Sign in to reply
      • Verify Answer
      • Cancel
    • Kevin van Haaren
      0 Offline Kevin van Haaren Wed, May 2 2018 3:31 PM in reply to juanmanuel

      I'm not seeing this. In fact I see the opposite. for a datasource with 2000 users Get-PWUser takes about 3 seconds and Get-PWUsersByMatch takes .9 seconds.

      Get-PWUser

      >new-pwlogin "HNTB Design Build"
      True
      >Measure-Command { $a = Get-PWUser }
      
      TotalSeconds      : 2.9892346
      TotalMilliseconds : 2989.2346
      
      >$a.count
      2046
      >Undo-PWLogin
      True
      

      Get-PWUsersByMatch

      >new-pwlogin "HNTB Design Build"
      True
      >Measure-Command { $a = Get-PWUsersByMatch }
      
      TotalSeconds      : 0.8874243
      TotalMilliseconds : 887.4243
      
      >$a.count
      2046
      >undo-pwlogin
      True
      

      i ran each several times in different order to make sure i wasn't seeing that Get-PWUsersByMatch was benefiting from Get-PWUser caching the query first. Get-PWUsersByMatch got same results under 64-bit PowerShell.

      I'm running PWPS_DAB 1.5.3.0 and PWPS 0.0.0.6 (which is pretty old, possible a newer version is faster?)

       

      • Cancel
      • Vote Up 0 Vote Down
      • Sign in to reply
      • Verify Answer
      • Cancel
    • Jon Rizzo
      0 Jon Rizzo Thu, Sep 17 2020 11:19 AM in reply to Kevin van Haaren

      I am getting the same results as the original poster.  Get-PWUsersByMatch is significantly slower.  In the example above, Get-PWUsersByMatch takes 3 times as long as Get-PWUser for me (see below).  When using options such as -Email or -UserId, the difference is even more pronounced.  Perhaps earlier versions were faster?  


      PS Y:\> measure-command { $a = Get-PWUser }


      Days : 0
      Hours : 0
      Minutes : 0
      Seconds : 20
      Milliseconds : 177
      Ticks : 201778442
      TotalDays : 0.000233539863425926
      TotalHours : 0.00560495672222222
      TotalMinutes : 0.336297403333333
      TotalSeconds : 20.1778442
      TotalMilliseconds : 20177.8442


      PS Y:\> measure-command { $a = Get-PWUsersByMatch }


      Days : 0
      Hours : 0
      Minutes : 1
      Seconds : 0
      Milliseconds : 433
      Ticks : 604334192
      TotalDays : 0.00069946087037037
      TotalHours : 0.0167870608888889
      TotalMinutes : 1.00722365333333
      TotalSeconds : 60.4334192
      TotalMilliseconds : 60433.4192

      • Cancel
      • Vote Up 0 Vote Down
      • Sign in to reply
      • Verify Answer
      • Cancel
    • Kevin van Haaren
      0 Offline Kevin van Haaren Thu, Sep 17 2020 2:04 PM in reply to Jon Rizzo

      what version of pwps_dab & Projectwise administrator? How many users?

      I do see a difference but for 2400 users the Get-PWUser is about .14 second and Get-PWUsersBySearch is about 1 second so I don't really worry about.

      I've got pwps_dab 1.23.3.0 and Admin 10.00.03.280

      [Prod]> measure-command { $a = Get-PWUser }
      
      
      Days              : 0
      Hours             : 0
      Minutes           : 0
      Seconds           : 0
      Milliseconds      : 141
      Ticks             : 1413798
      TotalDays         : 1.63634027777778E-06
      TotalHours        : 3.92721666666667E-05
      TotalMinutes      : 0.00235633
      TotalSeconds      : 0.1413798
      TotalMilliseconds : 141.3798
      
      
      
      [Prod]> measure-command { $b = Get-PWUsersByMatch }
      
      
      Days              : 0
      Hours             : 0
      Minutes           : 0
      Seconds           : 1
      Milliseconds      : 8
      Ticks             : 10084953
      TotalDays         : 1.16723993055556E-05
      TotalHours        : 0.000280137583333333
      TotalMinutes      : 0.016808255
      TotalSeconds      : 1.0084953
      TotalMilliseconds : 1008.4953
      
      
      
      [Prod]> $a.count
      2393
      [Prod]> $b.count
      2393
      

       

      • Cancel
      • Vote Up 0 Vote Down
      • Sign in to reply
      • Verify Answer
      • Cancel
    • Jon Rizzo
      0 Jon Rizzo Fri, Sep 18 2020 8:36 AM in reply to Kevin van Haaren

      pwps_dab 1.23.3.0 and admin 10.00.03.140 with 1833 users.  We are cloud hosted, which probably explains why our numbers are so much higher than yours.  I'm not as concerned with that as the disparity between the two methods.   In fact, I can even see the disparity in your numbers, though maybe to a lesser degree (141 milliseconds vs 1008 milliseconds).  I just ran it again on my end and I got 264 ms versus 54792ms.  The cloud hosting likely has something to do with it, but the disparity is there for both of us.

      • Cancel
      • Vote Up 0 Vote Down
      • Sign in to reply
      • Verify Answer
      • Cancel

    Communities
    • Home
    • Getting Started
    • Community Central
    • Products
    • Support
    • Secure File Upload
    • Feedback
    Support and Services
    • Home
    • Product Support
    • Downloads
    • Subscription Services Portal
    Training and Learning
    • Home
    • About Bentley Institute
    • My Learning History
    • Reference Books
    Social Media
    •    LinkedIn
    •    Facebook
    •    Twitter
    •    YouTube
    •    RSS Feed
    •    Email

    © 2023 Bentley Systems, Incorporated  |  Contact Us  |  Privacy |  Terms of Use  |  Cookies