Alexandra Smith

Alexandra Smith

  • NA
  • 14
  • 5.6k

PnPPoweShell-WriteObject/WriteError methods cannot be called

Aug 31 2018 9:08 AM
Hi,
 
From my first question about

Download multiple SharePoint files using PNP Powershell

I am getting the following error:
 
Get-PnPFile : The WriteObject and WriteError methods cannot be called from outside the overrides of the BeginProcessing, ProcessRecord, and EndProcessing methods, and
they can only be called from within the same thread. Validate that the cmdlet makes these calls correctly, or contact Microsoft Customer Support Services.
 
I have changed the script in order to try get it to work but I have had no such luck!  Can anybody help with this please? 

Answers (1)