0

We are generating a PNP PowerShell to copy any document library files to file share. The issue we are facing is with "Get-PnPListItem" command. When we try with a tenant that has custom script enabled in Admin tenant, we are getting all values. But if we try with any new trial tenant, which does not have these setting, we are not getting the Title values.

enter image description here

enter image description here

I am not able to find out any document where I can find the pre-requisite for PNP-PowerShell. Can someone tell that is it required or we are missing something else?

Note - We have Provided permission by "https://microsoft.com/devicelogin" URL.

1

No.

Custom Script enabling is not required for using PnP PowerShell.

It seems your documents don't have any value in Title field (Name field is different).

Document properties in library:

enter image description here

Output:

enter image description here

Documentation: Get-PnPListItem

1

The Title field is not always automatically populated, and it is different than the filename which is displayed in the screenshot.

To view the filename, title (and add more fields) you can edit the following script

Get-PnPListItem -List "Documents" | %{Write-Host "$($_["FileLeafRef"]), $($_["Title"]), $($_.ID)"}

There might be an easier script somewhere out there...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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