Problem with checkout

Hi - I'm able to download modules into a local folder, but in order to update and checkin, the topic must first be checked out. I don't understand the error I am getting using the code below. The error is below the line of code.  It looks like the right number of arguments are being sent.

 

$ishSession.DocumentObj25.CheckOut($fileGUID, "1", "en-US", "", "", "")

Cannot find an overload for "CheckOut" and the argument count: "6".
At C:\SDL\PowerShellScripts\Code\GetSaveEditSaveLoad4.ps1:42 char:9
+ $ishSession.DocumentObj25.CheckOut($fileGUID, "1", "en-US", " ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], MethodException
+ FullyQualifiedErrorId : MethodCountCouldNotFindBest

  • Hi Richard, why are you using the internal proxies from the ishSession object? Please prefer always the cmdlets of ISHRemote over the proxies of the session object.

    Regarding your error, the signature of the function you try to use is not aligned with your implementation. This is a standard .net error. It's not that easy to see the signature in PowerShell because PowerShell hasn't been built for this, and this one more reason for my initial advice. Still one trick is to open PowerShell ISE, and fill in half of the function name and press Ctrl+Space. For a short period you'll have a similar experience with Visual Studio
  • Got it! Thanks Alex. I used the Set-IshDocumentObj and didn't need the checkout after all.
  • You are welcome
    ISHRemote when necessary combines different API calls. Initially it was almost a 1-1 mapping between cmdlet and API function but I believe it's should provide a higher level of experience, same as we try to have a high quality UX for the UI based applications.