Pergunta

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.

Foi útil?

Solução

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.

Outras dicas

Licenciado em: CC-BY-SA com atribuição
Não afiliado a sharepoint.stackexchange
scroll top