SharePoint 2016: How To Configure Usage & Health Service Application Using PowerShell
Usage & Health Service Application is one of the most important Service Applications that provides vital information on the Health & State of SharePoint Farm.
In SharePoint 2016, Usage Service is collecting information on Timer Service Monitoring, Event Logs, Performance Counters, Search Usage, Sandbox Usage, and Site Collection Usage and much more.
This Service application is responsible to keep monitoring the resource, health & state associated with the SharePoint Farm and logs this information to Log Files on SharePoint Hive or any designated path along with SharePoint Logging Database “WSS_Logging” in SQL Server Database.
Many other components in SharePoint like Developer Dashboard, Search Analytics, Web Analytics Reports are using this data to provide logical User Interface for the end users.
We will get empty reports in Web Analytics reports section, if usage and health data collection service application is not configured properly.
It is not possible to Provision Usage & Health Service using Central Admin, as there is no User Interface available.
Let us first get into Central Admin Site to see if there is options available on the User Interface to provision Usage Service
Go to “Central Admin” – > “Manage Service Applications”
https://howtodowithsharepoint.files.wordpress.com/2017/12/21.png?w=800
Click on “New” Menu on the Ribbon and in the existing list of available Service Application Templates we can see there is no template available for provisioning “Usage & Health Service Application”
https://howtodowithsharepoint.files.wordpress.com/2017/12/31.png?w=800
This concludes that we have to provision Usage Service using PowerShell as shown in the following steps-
https://howtodowithsharepoint.files.wordpress.com/2017/12/12.png?w=800
Launch “SharePoint 2016 Management Shell”.
https://howtodowithsharepoint.files.wordpress.com/2017/12/41.png?w=800
Step 1: Provision Service Application Instance
In this step, we will provision the Usage Service using “New- SPUsageApplication” cmdlet as shown below
New-SPUsageApplication -Name "Usage and Health Data Collection"
https://howtodowithsharepoint.files.wordpress.com/2017/12/51.png?w=800
Step 2: Provision Service Application Proxy
In this step, we will provision Service Application Proxy for Usage Service by using the following commands
$serviceProxy = Get-SPServiceApplicationProxy | where {$_.TypeName -eq "Usage and Health Data Collection Proxy"}
https://howtodowithsharepoint.files.wordpress.com/2017/12/61.png?w=800
$serviceProxy.Provision()
https://howtodowithsharepoint.files.wordpress.com/2017/12/71.png?w=800
Step 3: Verify Service Application
In this step we will verify the provisioning of service application by looking at “Service Application” Page in “Central Administration” as shown below-
https://howtodowithsharepoint.files.wordpress.com/2017/12/81.png?w=800
Step 4: Verify Service Application Database
In this step we will verify the provisioning of service application database by logging into “SQL Server Management Studio” as shown below-
https://howtodowithsharepoint.files.wordpress.com/2017/12/91.png?w=800
https://howtodowithsharepoint.files.wordpress.com/2017/12/101.png?w=800
This concludes the Service Application Provisioning Process using PowerShell.