Exception thrown randomly when using the Get-PnPFile inside a foreach loop to download all the files of a document library
Error - Unable to read data from the transport connection. The connection was closed.
Expected behavior
It should download the file from the relative url specified
Actual behavior
Please describe what you see instead. Please provide samples of HTML output or screenshots
Steps to reproduce behavior
Please include complete code samples in-line or linked from gists
Which version of the PnP-PowerShell Cmdlets are you using?
[ ] PnP PowerShell for SharePoint Online
What is the version of the Cmdlet module you are running?
(you can retrieve this by executing Get-Module -Name sharepointpnppowershell* -ListAvailable)
All of the following are installed
SharePointPnPPowerShellOnline 3.24.2008.1
SharePointPnPPowerShellOnline 3.24.2008.0
SharePointPnPPowerShellOnline 3.11.1907.0
How did you install the PnP-PowerShell Cmdlets?
[ ] Installed through the PowerShell Gallery with Install-Module
Reporting an Issue or Missing Feature
Exception thrown randomly when using the Get-PnPFile inside a foreach loop to download all the files of a document library Error - Unable to read data from the transport connection. The connection was closed.
Expected behavior
It should download the file from the relative url specified
Actual behavior
Please describe what you see instead. Please provide samples of HTML output or screenshots
Steps to reproduce behavior
Please include complete code samples in-line or linked from gists
function($fileRelativeUrl) { Get-PnPFile -ServerRelativeUrl $fileRelativeUrl -AsFile -Force -ErrorAction Stop }
Which version of the PnP-PowerShell Cmdlets are you using?
What is the version of the Cmdlet module you are running?
(you can retrieve this by executing
Get-Module -Name sharepointpnppowershell* -ListAvailable
) All of the following are installed SharePointPnPPowerShellOnline 3.24.2008.1 SharePointPnPPowerShellOnline 3.24.2008.0 SharePointPnPPowerShellOnline 3.11.1907.0How did you install the PnP-PowerShell Cmdlets?