Forum Discussion
phathuynh27
Aug 08, 2020Copper Contributor
Retrieve modified date for forms in a xml forms library
Hello, I would like to retrieve the the modified date of the forms that are stored in a XML forms library. The below script works for a document library. How do I revise it for what I need? Thank you.
$SiteURL= "https://abc.sharepoint.com/sites/test"
$ListName="test document library"
#Connect to PnP Online
Connect-PnPOnline -Url $SiteURL -Credentials $userCredentials
#Get All Files from the document library - In batches of 500
$ListItems = Get-PnPListItem -List $ListName -PageSize 500 | Where {$_["FileLeafRef"] -like "*.*"}
#Loop through all documents
$DocumentsData=@()
ForEach($Item in $ListItems)
{
#Collect Documents Data
$DocumentsData += New-Object PSObject -Property @{
FileName = $Item.FieldValues['FileLeafRef']
FileURL = $Item.FieldValues['FileRef']
Date = $Item.FieldValues['Created']
}
$DocumentsData
}
No RepliesBe the first to reply