new to SharePoint (on premise-2013), I've been learning PnP for a few weeks. I would like to make a tree view of any library and I'm searching for a fast way to display the file/folder hierarchy.

I thought Find-PnPFile would allow me to get file full paths very quickly. I'm puzzled as I can retrieve files, but don't know where they really are. I'm only getting the Name, Type and Last Modified date, not even the Id. So what's the best way to extract full names with Find-PnpFile? Am I missing something with Get-PnPProperty? If not the road to follow, what would be the best alternatives?

Thanks in advance


You can get the relative URL this way:

$file = Find-PnPFile -Match myFile.docx

Just prefix https://tenantName.sharepoint.com to get the absolute path.

  • 1
    Thank you very much. I don't know how I didn't see it!
    – tebans
    Jan 7 '19 at 17:18

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.