Bentley Communities
Bentley Communities
  • Site
  • User
  • Site
  • Search
  • User
ProjectWise
  • Product Communities
ProjectWise
ProjectWise PowerShell Extensions Forum Is there a Powershell cmdlet that mimics "Update Server Copy"?
    • Sign In

    • State Not Answered
    • Replies 2 replies
    • Subscribers 66 subscribers
    • Views 764 views
    • Users 0 members are here
    • powershell
    • PWPowerShell
    • pwps_dab
    • ProjectWise PowerShell Modules

    Is there a Powershell cmdlet that mimics "Update Server Copy"?

    Jason Sutherland-sebo
    Offline Jason Sutherland-sebo over 5 years ago

    I am working on a script to generate some benchmark results for typical tasks that users run from the PW Explorer Client and one of the tasks I want to benchmark is the "Update Server Copy". I can't seem to find a cmdlet that does this particular workflow. Any help or direction would be greatly appreciated.

    Sample of what I am doing:

    $login = New-PWLogin -DatasourceName $datasource
    Import-PWDocuments -InputFolder $inputFolder -ProjectWiseFolder $PWFolder -ExtensionsOfInterest ".file" -CreateVersions
    Get-PWDocumentsBySearch -FolderPath $PWFolder -FileName '%.file' | CheckOut-PWDocuments -Export -ExportFolder $exportFolder -RemoveCopies
    #Update Server Copy

    Undo-PWLogin

    • Sign in to reply
    • Cancel
    • Kevin van Haaren
      0 Offline Kevin van Haaren Thu, Jun 21 2018 3:00 PM

      checkin does the same thing as update server copy, except it releases the lock as well.  BTW, neither checkin nor update server copy actually copy the file if no changes have been made. your  benchmark will be unrealistically fast in that scenario.

      Also, if there are already copies of the files on the local machine then the checkout will be fast as well, unless you turn off DFT.

      A more realistic benchmark might be to create a file with a random name locally, add that to projectwise and then check it out, modify it and check it back in. That will bypass most of the caching scenarios that could get involved and give you a worse case benchmark.

       

      • Cancel
      • Vote Up 0 Vote Down
      • Sign in to reply
      • Verify Answer
      • Cancel
    • Dan Williams
      0 Offline Dan Williams Mon, Jun 25 2018 12:21 PM in reply to Kevin van Haaren

      Things might have changed, but a quick check of the documentation seems to indicate that based on user and datasource settings, it is still possible to have a configuration where files are ALWAYS transferred if they have changed or not, or if they exist (in the working directory) or not.  Best to check how your datasource and user settings are configured before making any conclusions about your benchmark results.  And as Kevin indicated, DFT would be a factor as well as would how congested your network paths are at the time of the benchmark, which I suspect is what you are most curious about.

      • 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