0

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.

0

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.

| improve this answer | |
0

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

https://social.technet.microsoft.com/Forums/en-US/e4d6d921-d1e1-4177-9c87-3c30ef30e7f5/site-collection-top-visitor-report-showing-only-2000-users

| 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.