Get a Specific Service Application
Scenario/Problem: You need to obtain a specific service application reference.
Solution: Use the Get-SPServiceApplication
cmdlet to assign a variable the results using the -Identity
parameter.
Providing the identity of the service application with the Get-SPServiceApplication
cmdlet retrieves a specific service application. Use this to assign the results to an object for use in other cmdlets, as shown in Listing 6.3.
$sApp = Get-SPServiceApplication -Identity bc4399ed-a2e0-4397-bf07-cd3d207e630e
Tip
Instead of using -Identity
, you can use -Name
and provide the name of the service application in quotes.
Get PowerShell™ for SharePoint® 2013 How-To now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.