5

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

0

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.

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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