6

Is there any way to check site collection document libraries Metadata i.e. (last modified date, owner name) using SharePoint Online Shell?

2

1 Answer 1

1

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.

3
  • Can you explain how your code answers the question?
    – wjervis
    Commented Oct 2, 2018 at 12:52
  • 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.
    – TomB1
    Commented Oct 3, 2018 at 9:22
  • You should put that in your answer to improve it
    – wjervis
    Commented Oct 3, 2018 at 12:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.