By using code similar to Upload file to SharePoint Document library using powershell I am able to upload file, but they are in checked out state then. This works without the SharePoint snapin.
Following the advice in the answer to the above question does not work, because similar to the OP over there I do not have a $SPfile object available.
I tried to follow other advice using
$w = Get-SPweb ...;$w.getFolder, but this fails because the account running the script is not allowed to see the site, so
Get-SPweb consistently fails. The user account is only allowed to access the document library.
I am looking for a way to nevertheless get the uploaded document checked in. I could imagine two possible solutions:
- Some GET request to the URL with sufficient parameters performs the check-in.
- Get a document library object without first using
Get-SPweband walking down from there to the file. Put simple: is there something like
Get-SPlibrarythat does not first run a