pnpcore: I'm trying to add list items in a simple site.. but keep getting Invalid file name error:
I’m trying to add list items in a simple site… but keep getting Invalid file name error:
$batch = New-PnPBatch
Add-PnPListItem -List $list -Values @{"Title" ="site1"} -Batch $batch
Add-PnPListItem -List $list -Values @{"Title" ="site2"} -Batch $batch
Add-PnPListItem -List $list -Values @{"Title" ="site3"} -Batch $batch
$details= Invoke-PnPBatch -Batch $batch -Details
results in
Invalid file name. The file name you specified could not be used. It may be the name of an existing file or directory, or you may not have permission to access the file.
I’m using
Manifest 1.2.0 PnP.PowerShell
Tested with nightly build as well:
Manifest 1.2.7 PnP.PowerShell
Note: it works if I remove the batching.
_Originally posted by @bhishma in https://github.com/pnp/powershell/discussions/195_
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 34 (16 by maintainers)
@DaleyKD : thanks for helping out and creating the PR @ollimenzel / @rtonerii : I’ve merged the PR from @DaleyKD , this will be included in the tomorrow’s nightly build from PnP PS, so would recommend giving that a try and let us know.
@ollimenzel : That root Site Collection was definitely the piece I was missing. I don’t know if that’s the same issue for @rtonerii or not. I’ve submitted a PR and will see if it’s accepted by @jansenbe .
Hi in the meantime I opened a new report, and it was also reproduceable as you can see here: https://github.com/pnp/powershell/issues/668 It seems to be a problem with the root SiteCollection in my case
I’m having the same problem, but I’m not sitting behind a proxy. I tried it with two different tenants, but it’s failing for both. Can someone please look at this agian?!
We would propose to exclude the SharePoint tenant from the proxy, but it unfortunately stops here for us as we cannot control your proxy.