Creating Service Applications through PowerShell – SP2013

This will be an ongoing post until all are completed. The below PowerShell will show you how to add a service application as well as delete.

For deleting a service application, run the ‘Get-‘ commands first which can all be found below before running the remove in order to find the ID or the name.

Managed Metadata Service Application

Create the App

#Creates a new Application Pool for Managed MetaData Service Application
New-SPServiceApplicationPool -Name “MetaData_AppPool” -Account “CHIN\sp2013farm”
#Creates new Managed MetaData Service Application
New-SPMetadataServiceApplication -Name “MetaDataServiceApp” -ApplicationPool “MetaData_AppPool” -DatabaseName “SP2013-MetaDataDB”
#Creates new Managed MetaData Proxy
New-SPMetadataServiceApplicationProxy -Name “MetaDataServiceProxy” -ServiceApplication “MetaDataServiceApp”

ManagedMetaData2

ManagedMetaData

Delete the App

#Get-SPServiceApplication
#Removes Service Application
Remove-SPServiceApplication “52845e68-e7e1-4a18-b223-b6ea246c302c”#Get-SPServiceApplicationPool
#Removes Service Application Pool
Remove-SPServiceApplicationPool “TestMetaData_AppPool1″#Get-SPServiceApplicationProxy
#Removes Service Application Proxy
Remove-SPServiceApplicationProxy “77b8604b-c465-46a3-95f8-de05a10fa8c7”

 

Excel Services Application

Create the App

#Creates new Excel App Pool
New-SPServiceApplicationPool -Name “Test-ExcelAppPool” -Account “CHIN\sp2013farm”
#Creates new Excel Services Application
New-SPExcelServiceApplication -Name “Test Excel Services Application” -ApplicationPool “Test-ExcelAppPool”

 

Delete the App

#Gets a list of all Service Applications
Get-SPServiceApplication
#Removes Service Application
Remove-SPServiceApplication “d356b611-40b9-4bcd-930b-36e2718675b9″#Gets a list of all Application Pools
Get-SPServiceApplicationPool
#Removes Service Application Pool
Remove-SPServiceApplicationPool “Test-ExcelAppPool”

ExcelServices1

ExcelServices2

ExcelServices3

 

Next App TBC

Create the App

 

Delete the App