Right now from Site Collection Analytics - Top Visitor report we are getting only 2000 users, there should be more than 2000 user. how we can get all the users who have accessed for last one year.

Can we do it by using sharepoint power shell command or script to get Top Visitor Report/ excel file for SharePoint 2010 site Usage Web Analytics Service.


2 Answers 2


try the below code,

$server = "CentralAdminUrl" 
$webAppName = "MyWebApp" 
$sd = 01/01/2015 
$ed = 01/31/2015 

$wc = New-Object System.Net.WebClient 
$wc.Credentials =  [System.Net.CredentialCache]::DefaultCredentials 
$url = $server+ "/_layouts/WebAnalytics/Report.aspx?t=TopVisitorsReport&l=wa&id=https%3a%2f%2f"+$id+"%2f&WebAppName="+$webAppName+"&CD=true&SD="+$sd+"&ED="+$ed+"&SHOWANALYZETAB=1&Export=1" 

$file = "d:\Logs\$(get-date -f yyyy-MM)-WebApp-TopVisitors.csv" 

$wc.DownloadFile($url, $file)

Go in Central Admin on your SharePoint server and look at the URL for the web analytics reports. You can just create a web client object in your code and use that url to get the report.


For Site collection Top Visitor report I used work arround mentioned in below link


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.