kwizcom banner advertisement

Check if Service Application is Running in SharePoint using PowerShell

Couple of times, I had to get the service application's status prior performing activities such as: Stop and Start the service, Monitoring service application's availability, etc. Here is how we can check if the service application is running / created using PowerShell.

PowerShell script to check service application's status:
Add-PSSnapin microsoft.sharepoint.powershell -ErrorAction SilentlyContinue

#Display Name of the Service Application
$DisplayName="Managed Metadata Services"

#Get the Service Application from its Name
$ServiceApp = Get-SPServiceApplication | Where { $_.DisplayName -eq $DisplayName}
    
if($ServiceApp -ne $null)
{
 #get the Service application status
 $ServiceApp.Status
}
else
{
 Write-Host "Service application either not found or not created!"
}
This script gives the service application's current status. You can also get a service application from its type. Here is how:
#Type Name of the Service Application
$TypeName="Managed Metadata Service"

#Get the Service Application from its Type Name
$SeviceApp = Get-SPServiceApplication | Where {$_.TypeName -eq $TypeName}

Here is the Type Name of all service Applications:
Type Name
Access Services Web Service Application
Access Services 2010 Web Service Application
App Management Service Application
Application Discovery and Load Balancer Service Application
Business Data Connectivity Service Application
Excel Services Application Web Service Application
Machine Translation Service
Managed Metadata Service
PerformancePoint Service Application
PowerPoint Conversion Service Application
Search Administration Web Service Application
Search Service Application
Secure Store Service Application
Security Token Service Application
State Service
Usage and Health Data Collection Service Application
User Profile Service Application
Visio Graphics Service Application
Work Management Service Application
Word Automation Services

Check if Service Application is Running in SharePoint using PowerShell Check if Service Application is Running in SharePoint using PowerShell Reviewed by Salaudeen Rajack on 4:54 PM Rating: 5

No comments:

Please Login and comment to get your questions answered!

Powered by Blogger.