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 -SlowCheckIn-PWDocumentsOrFree -InputDocument $myFile -Free
$myFile = Get-PWDocumentsBySearch -FolderPath $docPath -DocumentName $importFile.Name -JustThisFolder -GetAttributes -Slow
CheckIn-PWDocumentsOrFree -InputDocument $myFile -Free
$myFile = Get-PWDocumentsBySearch -FolderPath $docPath -DocumentName $importFile.Name -JustThisFolderCheckIn-PWDocumentsOrFree -InputDocument $myFile -Free
$myFile = Get-PWDocumentsBySearch -FolderPath $docPath -DocumentName $importFile.Name -JustThisFolder
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.
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
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
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.
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?
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.
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.