You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a script that downloads files from SharePoint and manipulates the downloaded files in Excel. I’d like to run it asynchronously with ForEach-Object -Parallel so I can manipulate multiple files simultaneously, but I’m running into issues with Get-PnPFile.
The code below works if the $Reports array contains one value. But when there’s multiple values, I receive the error Object reference not set to an instance of an object. from the Get-PnpFile cmdlet.
Can anyone shed some light on the cause of this error?
This discussion was converted from issue #1985 on June 15, 2022 16:16.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
I have a script that downloads files from SharePoint and manipulates the downloaded files in Excel. I’d like to run it asynchronously with
ForEach-Object -Parallel
so I can manipulate multiple files simultaneously, but I’m running into issues withGet-PnPFile
.The code below works if the
$Reports
array contains one value. But when there’s multiple values, I receive the errorObject reference not set to an instance of an object.
from theGet-PnpFile
cmdlet.Can anyone shed some light on the cause of this error?
Beta Was this translation helpful? Give feedback.
All reactions