0

How to download SharePoint 2013 document library files using the PnP command Get-PnPFile ?

Connect-PnPOnline -Url http://sharepoint2013site -TransformationOnPrem -CurrentCredential   
$items = (Get-PnPListItem -List "Documents" -Fields "Title","GUID","FileLeafRef").FieldValues
Get-PnPFile -Url $items[0].FileRef -FileName $items[0].FileLeafRef -Path C:\tmp -AsFile

The terminal returns the following error:

Get-PnPFile: No digest found!

What I've already tried :

  • Add the option -ReturnConnection to Connect-PnPOnline command and then adding the -Connection option to the Get-PnPFile command. I got the same result.
  • Using the -Force option with the Get-PnPFile command. Same result.

I am using PowerShell Version: 7.3.3

1 Answer 1

1

PnP PowerShell is officially not supported for being used in an on-premises context.

As per the PnP PowerShell documentation:

Connect-PnPOnline -Url "https://portal.contoso.com" -TransformationOnPrem -CurrentCredential

Connects to on-premises SharePoint 2013, 2016 or 2019 site with the current user's on-premises Windows credential (e.g. domain\user). This option is only supported for being able to transform on-premises classic wiki, webpart, blog and publishing pages into modern pages in a SharePoint Online site. Although other PnP cmdlets might work as well, they're officially not supported for being used in an on-premises context. See http://aka.ms/sharepoint/modernization/pages for more details on page transformation.

Source: Connect-PnPOnline - Example 11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.