I am trying to apply a bunch of metadata to a bunch of files in SPO. Using Find-PnPFile I can find the files in the subfolders. What I cannot figure out is how to pass the results of the Find-PnPFile back to Set-PnPListItem to set the values of the documents. I don't have the Identity of the file. What would be AMAZING is if there is a way to do this in a batch so I don't have to update every item one after another. It just feels like there should be a way to pass an array of document IDs and the value I want to set.
$updatefiles = Find-PnPFile -Folder "Documents/$($_.Name)" -Match "*"
foreach ($file in $updatefiles){
Set-PnPListItem -List "Documents" -Values @"MMSField"="foo|bar|$($folder.Name)"} -Identity <<HELP>>
}