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



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)?

| improve this answer | |

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.