I am trying to get the metadata(column values) for each file in powershell (refer image and code till now) While running the below code name i am getting, but other values if i try like only the name is priniting..
$File.Name + $File.FieldValues.Hash | Format-Table
is there any way to get all the values from the columns for every file in the folder ? -
Code Till Now -
Import-Module SharePointPnPPowerShellOnline
#Get Connection to the url , #Connect-PnPOnline $URL
Connect-PnPOnline "Some SharePoint Url" -UseWebLogin
$SharePointFolderPath = "Some folder in Shared Documents"
$FolderItems = Get-PnPFolderItem -ItemType file -Recursive -FolderSiteRelativeUrl $fileURL
foreach($file in $FolderItems){
#$File = Get-PnPFile -Url $fileURL -AsListItem -ErrorAction SilentlyContinue #by using this and giving the exact path/Filename.txt the values are coming for only that file but not for all the files.. but not with get folder items also.
$File.Name #Only name is coming
$File.Hash #Hash column is custom created by myself but its not returning anything other than null,the actual value should be returned.
#$File
}