Is there any way to check site collection document libraries Metadata i.e. (last modified date, owner name) using SharePoint Online Shell?
1 Answer
This CSOM code should help.
$web = $context.Web
$site = $context.Site
$list = $web.Lists.GetByTitle("Tender List");
$fields = $list.Fields;
$context.Load($web)
$context.Load($site)
$context.Load($list)
$context.Load($fields)
$context.ExecuteQuery()
$fields | select InternalName | Export-Csv -path "d:\blabla.csv";
If you run the code, and replace the list title and CSV Path, it will output all the fields (including Last Modified Date and Owner Name) to a CSV File. The code can be modified to output to an array as well rather than CSV.
-
-
If you run the code, and replace the list title and CSV Path, it will output all the fields (including Last Modified Date and Owner Name) to a CSV File. The code can be modified to output to an array as well rather than CSV.– TomB1Commented Oct 3, 2018 at 9:22
-