Friday, September 19, 2014

Create Usage and Health Data Collection Service Application in SharePoint 2013 using PowerShell

Usage and Health data collection service application collects data about end user usage and health of the entire farm. This data is used in Health monitoring and web analytics service. Usage and Health Data Collection Service Application can be only created through PowerShell in SharePoint 2013. You'll get empty reports in Web Analytics reports section, if usage and health data collection service application isn't configured properly.

Usage and Health Data collection database that should not be part of the Availability Group!

Create Usage and Health Data Collection Service Application in SharePoint 2013 using PowerShell:
Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue

#Configuration Variables
$UsageSAName = "Hosting Farm Usage and Health Data Collection Service"
$DatabaseName = "HostingFarm_Usage_SA"
$DatabaseServer="SP13_SQL"
$UsageLogPath = "D:\UsageLogs\"

#Get the Usage Service Application Service Instance
$ServiceInstance = Get-SPUsageService 

#Create new Usage Service application
New-SPUsageApplication -Name $UsageSAName -DatabaseServer $DatabaseServer -DatabaseName $DatabaseName -UsageService $ServiceInstance #> $null

#Create Service Application Proxy..." 
$proxy = Get-SPServiceApplicationProxy | where {$_.TypeName -eq "Usage and Health Data Collection Proxy"}
$proxy.Provision()

#Set Usage Service Application Option
Set-SPUsageService -LoggingEnabled 1 -UsageLogLocation $UsageLogPath -UsageLogMaxSpaceGB 1 
Here is how it appear in Service applications page:
create usage and health data collection service application sharepoint 2013
SharePoint 2013 create usage and health data collection service application PowerShell
Please note, Only one instance of the usage and data collection service application can be created for a SharePoint farm! If you try to create one more, you'll get "A Usage Application already exists in this farm." error.



You might also like:
SharePoint Usage Reports
Usage reports, collaboration and audit for SharePoint.
Document SharePoint Farm
Automatically generate SharePoint documentation.
*Sponsored


Check out these SharePoint products:

No comments :

Post a Comment

Please Login and comment to get your questions answered!

You might also like:

Related Posts Plugin for WordPress, Blogger...