PnP-PowerShell icon indicating copy to clipboard operation
PnP-PowerShell copied to clipboard

Second call to Add-PnPFile fails

Open lvasiliou opened this issue 9 years ago • 2 comments

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

lvasiliou avatar Jan 09 '17 15:01 lvasiliou

Similar to https://github.com/SharePoint/PnP-PowerShell/issues/727, having the same issue, try the $file trick?

DavidLozzi avatar Mar 08 '17 20:03 DavidLozzi

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!”

spdevdocs avatar Apr 28 '18 14:04 spdevdocs