Get a Specific Solution

Scenario/Problem: You need to obtain a specific solution reference.

Solution: Use the Get-SPSolution cmdlet to assign a variable the results using the -Identity parameter.

Providing the identity of the solution with the Get-SPSolution cmdlet retrieves a specific solution. Use this to assign the results to an object for use in other cmdlets, as shown in Listing 9.3.

Listing 9.3. Assigning a Variable to a Specific Solution

$solution = Get-SPSolution-Identity c0e31dec-294d-4f2d-9ae4-f2e637c766bd

Tip

Instead of using the solution GUID, you may instead use the name of the solution as listed in the output when issuing Get-SPSolution without any parameters.

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.