Bentley Communities
Bentley Communities
  • Site
  • User
  • Site
  • Search
  • User
ProjectWise
  • Product Communities
ProjectWise
ProjectWise PowerShell Extensions Forum Permissions/Settings needed for CheckIn-PWDocumentsOrFree
    • Sign In

    • State Not Answered
    • Replies 7 replies
    • Subscribers 65 subscribers
    • Views 335 views
    • Users 0 members are here

    Permissions/Settings needed for CheckIn-PWDocumentsOrFree

    Karl Sumwalt
    Offline Karl Sumwalt 6 months ago

    I have files checked out by a Restricted Admin account via a PowerShell script.  When I try to Free them using the same account in a later script, I get an error 58017.  This is apparently:

    Error 58017: Document is not checked out to this node. You cannot check in or free documents that are checked out to another node.

    This only occurs if this account is in the Restricted Admins group.  When placed in the Administrators group, it works.  But we would like to keep the account as Restricted Admins for internal reasons.  Any idea what could be causing this error?  I have tried a few variations on the below lines, all with the same results.  I can provide additional code but up to this point it reads data from spreadsheets and logs into the datasource.  I then get the file by searching on the file name and path.

    $myFile = Get-PWDocumentsBySearch -FolderPath $docPath -DocumentName $importFile.Name -JustThisFolder -GetAttributes -Slow
    CheckIn-PWDocumentsOrFree -InputDocument $myFile -Free

    $myFile = Get-PWDocumentsBySearch -FolderPath $docPath -DocumentName $importFile.Name -JustThisFolder
    CheckIn-PWDocumentsOrFree -InputDocument $myFile -Free

    Get-PWDocumentsBySearch -FolderPath $docPath -DocumentName $importFile.Name -JustThisFolder -GetAttributes -Slow | CheckIn-PWDocumentsOrFree -Free

    All of these result in the 58017 error as listed above.  Any thoughts?  The user account has the right to Free documents.

    Kindest Regards,

    Kar S

    • Sign in to reply
    • Cancel
    • MWBSI
      0 MWBSI Wed, Mar 1 2023 4:45 PM

      Looks like restricted admins can't free documents that other users have checked out with ProjectWise Explorer either.  You may want to verify.  

      Also, it looks like there is a way to provide restricted admins this capability with document security.  See 

      https://communities.bentley.com/other/old_site_member_blogs/bentley_employees/b/jo_wests_blog/posts/set-me-free 

      This post shows you do set up the free permission for each document.  It would not be difficult to do this at the folder or work area level.  One of the PW security gurus in this group or the ProjectWise Design Integration could help you with this if need be. It really is a general ProjectWise functionality question.  

      You could write a PowerShell script to change each folder's security so that it grants your restricted security admin(s) the Free permission described in the Jo West post.

      Hope this helps,

      Mark Weisman | Bentley Systems

      • Cancel
      • Vote Up 0 Vote Down
      • Sign in to reply
      • Verify Answer
      • Cancel
    • Karl Sumwalt
      0 Offline Karl Sumwalt Wed, Mar 1 2023 5:03 PM in reply to MWBSI
      MWBSI said:
      Looks like restricted admins to free documents that other users have checked out with ProjectWise Explorer either.  You may want to verify.

      Sorry, I am not following what you are trying to say here.  Can you clarify this statement, please?

      It appears the account has Free rights to the documents and that this is on the account itself and not from a group.  I will double check this tomorrow but it does appear that the account used has rights to free a document it could not.

      • Cancel
      • Vote Up 0 Vote Down
      • Sign in to reply
      • Verify Answer
      • Cancel
    • MWBSI
      0 MWBSI Wed, Mar 1 2023 5:14 PM in reply to Karl Sumwalt

      With ProjectWise Explorer please do the following:

      1. Log in as a user that is not in the restricted admins group

      2. Check out a document. 

      3. Log out of ProjectWise Explorer

      4. Log back in with a user that is a member of the restricted admins group but not the Administrator group,.

      5. Try to free the document you checked out in step 2.

      Were you able to free the document?

      Thanks,

      Mark Weisman | Bentley Systems

      • Cancel
      • Vote Up 0 Vote Down
      • Sign in to reply
      • Verify Answer
      • Cancel
    • Karl Sumwalt
      0 Offline Karl Sumwalt Wed, Mar 1 2023 5:18 PM in reply to MWBSI

      With PowerShell, I am trying to Free the document with the same account which checked the document out.  This check out was done with a previously run PowerShell Script.  I will run the test tomorrow, but it doesn't seem like a pertinent test since both operations are being attempted with the same account.

      • Cancel
      • Vote Up 0 Vote Down
      • Sign in to reply
      • Verify Answer
      • Cancel
    • MWBSI
      0 MWBSI Wed, Mar 1 2023 5:37 PM in reply to Karl Sumwalt

      Oh, I see...

      Sorry for the confusion.  Using the latest PowerShell 64 bit version, I successfully logged in with a user only in the Restricted Administrator group, checked out a document with Checkout-PWDocuments and freed it with  CheckIn-PWDocumentsOrFree.   

      Asking the obvious, are you sure you are executing the checkout script and the free script on the same computer?  If you are logged in as user in the Administrator group, you will be able to free documents from any computer.  However if the logged in user is not in the Administrator group (Restricted Administrator is not the same) you need to free from the computer you checked the document out from.  That is, unless you set up security as I mentioned previously.

      Mark Weisman | Bentley Systems

      • 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