Hello SharePoint Pals,
Here is an Interesting piece of requirement that I would like to share with you all. Suddenly one of my customers had come up with a requirement , that he would like to know how frequent the SharePoint doucment library is modified and usage analytics of the documents in a document library. The simple and efficient method that I follow is to get Version History for all the documents in a SharePoint Library using PowerShell Commands.
Here is the piece of code provided below.
- $Site = Get-SPSite http://mysite/Sample
- $Webs = $Site.AllWebs
- foreach ($Web in $Webs)
- {
- foreach ($List in $web.Lists)
- {
- //Check if the Versioning is enabled or not.
- if($List.EnableVersioning)
- {
- $Item=$List.Items[0]
- foreach($Version in $Item.Versions)
- {
- Write-Host "Documen Library Name:" $List.Title "-" "Document Name:" $Item.Title $Version.VersionLabel
- }
- }
- }
- }
- $Web.Dispose()
- $Site.Dispose()

Lakshmanan Sethu SankaranarayanPosted Mar 24, 2015, 12:39 AM
Gowtham Rajamanickam Thank you for reading. sure will upload :)
Gowtham RajamanickamPosted Mar 23, 2015, 11:14 PM
Great...if possible kindly upload ur output screen shot also....