Add-PnPFile multiple times causes "format-default : The collection has not been initialized." error #2257
Unanswered
BurtJohnsonfbl
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Using 1.11.0 PnP.PowerShell
$SourceFilePath1 uploads fine. Powershell then throws the following error.
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.Comma
nds.FormatDefaultCommand
If I switch the last 2 lines around, the first one is always uploaded and the second one gives the error.
I tried a Start-Sleep -Seconds 120 between the two to no avail.
Thanks, Burt
Beta Was this translation helpful? Give feedback.
All reactions