Friday, January 24, 2014

How to Create Usage Data Service Application SharePoint 2013 with Powershell

If you need to create Usage Data Service Application in SharePoint (2010 and 2013) you can see that no UI is provided to do that in Central Administration.

You can use this simple PowerShell Script to create Usage Data Service Application and corrispondent Proxy.

New-SPUsageApplication -Name "Usage Service Application" -DatabaseServer SQLSP2013 -DatabaseName "SP2013_UsageDB" -UsageService $serviceInstance
$usa = Get-SPServiceApplicationProxy | where {$_.TypeName -like "Usage*"}
$usa.Provision()