February 2013
Intermediate to advanced
304 pages
8h 26m
English
Scenario/Problem: You need to obtain a specific service instance reference.
Solution: Use the Get-SPServiceInstance cmdlet to assign a variable to the results using the -Identity parameter.
Providing the identity of the service instance with the Get-SPServiceInstance cmdlet retrieves a specific service instance. Use this to assign the results to an object for use in other cmdlets, as shown in Listing 6.8.
Listing 6.8. Assigning a Variable to a Specific Service Instance
$serviceInst = Get-SPServiceInstance -Identity 5fedc699-7810-4157-9c59-19f7d6e67e38
Read now
Unlock full access