Second call to Add-PnPFile fails
Hello,
I am creating a ps1 where i need to upload some files to the Style Library for SharePoint 2016 Platform Update. The first Add-PnPFile call works, however the second one fails with:
format-default : The collection has not been initialized. It has not been requested or the request has not been executed.
It may need to be explicitly requested.
+ CategoryInfo : NotSpecified: (:) [format-default], CollectionNotInitializedException
+ FullyQualifiedErrorId : Microsoft.SharePoint.Client.CollectionNotInitializedException,Microsoft.PowerShell.Commands.F
ormatDefaultCommand
Similar to https://github.com/SharePoint/PnP-PowerShell/issues/727, having the same issue, try the $file trick?
We closed this issue as it had not activity within last 180 days. This is a generic process we have decided to perform for issues, which have not been explicitly marked still to be "work in progress" based on tags. We are performing this cleaning to make sure that old issues that have already been solved (but not closed) or are no longer relevant are cleaned out and make the issues more manageable. If this issue still valid, we would ask you to open a new issue and follow the guidance in the issue template related on the recommended location. We do apologize any inconveniences this might cause. Please do remember that issues in the issue lists are also messages for others in the community, so you can also check if you can assist on any of them. “Sharing is caring!”