How to see the number of contributions for a user over the past year?
-
Thursday, February 16, 2012 6:26 AM
Hi,
We have a requirement, to find out the numbers of contributions to a sharepoint site by different users over some period of time .
Please let me know the different options available, appreciate your help.
Thanks,
bnarasimharao
- Edited by Mike Walsh FIN Thursday, February 16, 2012 9:25 AM Is there a way in SharePoint unnecessary. Replaced with How in title
All Replies
-
Tuesday, February 21, 2012 10:23 AMModerator
-
Thursday, February 23, 2012 12:17 AM
The below script is scoped to a single list on a site, but the same logic can be extrapolated to the entire farm.
Set the variable for a web
$spweb = get-spweb http://spSet the variable for a list in the web
$lists = $spweb.Lists["Shared Documents"]Set the variable for the items in that list
$items = $lists.ItemsSet the user for which you want to find the footprint in SharePoint
$user = "contoso\administrator"Declare $docs as an array
$docs = @()Set the $docs variable with all the items in the list which has "contoso\administrator" as the author
foreach($i in $items) { if ($i.properties.values -eq $user) {$docs = $docs + $i.name}}Count the items for which contoso\administrator is the author
$docs.Count- Marked As Answer by Daniel YangMicrosoft Contingent Staff, Moderator Monday, February 27, 2012 2:20 AM
-
Thursday, February 23, 2012 12:26 AM
Narsimha,
You can use this blog http://blog.falchionconsulting.com/index.php/2010/08/getting-an-inventory-of-all-sharepoint-documents-using-windows-powershell/ to extrapolate the solution I provided to you above, for your entire farm.
- Marked As Answer by Daniel YangMicrosoft Contingent Staff, Moderator Monday, February 27, 2012 2:20 AM

