0

I get my document with : $doc = $web.GetFile($docUrl) Can you tell me if there is a method to get specific metadata on document?

Thanks.

1
  • Did you mean all columns related to document? Commented Nov 17, 2015 at 10:18

1 Answer 1

1

You can Access metadata very easily. Here is an example code:

Add-PSSnapin microsoft.sharepoint.powershell -ErrorAction SilentlyContinue
$web = Get-SPWeb  "UrlOfWeb"
$doc = $web.GetFile("URLofFile") 
Write-Host $doc.Name
Write-Host $doc.Author
Write-Host $doc.ModifiedBy
Write-Host $doc.Versions.Count

Or did you mean sth else with "metadata", for instance custom properties (Property Bag)?

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.