Install-SPSolution
Updated: October 30, 2012
Applies to: SharePoint Foundation 2013 | SharePoint Server 2013 Enterprise
Deploys an installed SharePoint solution in the farm.
Install-SPSolution [-Identity] <SPSolutionPipeBind> [-AllWebApplications <SwitchParameter>] [-AssignmentCollection <SPAssignmentCollection>] [-CASPolicies <SwitchParameter>] [-CompatibilityLevel <String>] [-Confirm [<SwitchParameter>]] [-Force <SwitchParameter>] [-FullTrustBinDeployment <SwitchParameter>] [-GACDeployment <SwitchParameter>] [-Language <UInt32>] [-Local <SwitchParameter>] [-Time <String>] [-WebApplication <SPWebApplicationPipeBind>] [-WhatIf [<SwitchParameter>]]
Install-SPSolution [[-Identity] <SPSolutionPipeBind>] -Synchronize <SwitchParameter> [-AssignmentCollection <SPAssignmentCollection>] [-Confirm [<SwitchParameter>]] [-Language <UInt32>] [-WhatIf [<SwitchParameter>]]
Parameters
1| Parameter | Required | Type | Description | ||
| Identity | Required | Microsoft.SharePoint.PowerShell.SPSolutionPipeBind | Specifies the SharePoint solution to deploy. The value must be an authentic GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; an authentic name of a SharePoint solution (for example, SPSolution1); or an instance of an authentic SPSolution object. | ||
| AllWebApplications | Optional | System.Management.Automation.SwitchParameter | Specifies that the new SharePoint solution is deployed for all SharePoint web applications in the farm. | ||
| AssignmentCollection | Optional | Microsoft.SharePoint.PowerShell.SPAssignmentCollection | Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects are automatically disposed of if an assignment collection or the Global parameter is not used.
| ||
| CASPolicies | Optional | System.Management.Automation.SwitchParameter | Specifies that code access security (CAS) policies can be deployed for the new SharePoint solution. | ||
| CompatibilityLevel | Optional | System.String | Specifies whether to install into the solution, into a specific version directory based on CompatibilityLevel. The default behavior if this parameter is not specified is to install the solution only to the version directory based on the version tracked in the manifest of the solution's cab file. For the list of values, see the table in the Detailed Description section. | ||
| Confirm | Optional | System.Management.Automation.SwitchParameter | Prompts you for confirmation before executing the command. For more information, type the following command: get-help about_commonparameters | ||
| Force | Optional | System.Management.Automation.SwitchParameter | Forces the deployment of the new SharePoint solution. | ||
| FullTrustBinDeployment | Optional | System.Management.Automation.SwitchParameter | Specifies that full trust Bin deployment is permitted. This parameter is to be used if the solution is fully trusted. Bin assembly is an assembly installed into the bin directory of the virtual server. The assembly in the package will have DeploymentTarget=WebApplication attribute set. For additional information about bin assembly, see Assembly Element | ||
| GACDeployment | Optional | System.Management.Automation.SwitchParameter | Specifies that global assembly cache (GAC) can be deployed for the new SharePoint solution. | ||
| Language | Optional | System.UInt32 | Specifies a language for the solution when a solution language package is deployed. If this parameter is not specified, zero ("0") is assumed. Use zero for solutions that are valid for all languages. | ||
| Local | Optional | System.Management.Automation.SwitchParameter | Deploys the solution on the active server. | ||
| Time | Optional | System.String | Specifies when the solution will be deployed. The default value is immediate deployment. The type must be a valid DateTime value, in the form 2010, 5, 1. | ||
| WebApplication | Optional | Microsoft.SharePoint.PowerShell.SPWebApplicationPipeBind | Deploys the SharePoint solution for the specified SharePoint web application. The value must be in one of the following forms:
| ||
| WhatIf | Optional | System.Management.Automation.SwitchParameter | Displays a message that describes the effect of the command instead of executing the command. For more information, type the following command: get-help about_commonparameters |
| Parameter | Required | Type | Description | ||
| Identity | Required | Microsoft.SharePoint.PowerShell.SPSolutionPipeBind | Specifies the SharePoint solution to deploy. The value must be an authentic GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; an authentic name of a SharePoint solution (for example, SPSolution1); or an instance of an authentic SPSolution object. | ||
| AssignmentCollection | Optional | Microsoft.SharePoint.PowerShell.SPAssignmentCollection | Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects are automatically disposed of if an assignment collection or the Global parameter is not used.
| ||
| Confirm | Optional | System.Management.Automation.SwitchParameter | Prompts you for confirmation before executing the command. For more information, type the following command: get-help about_commonparameters | ||
| Language | Optional | System.UInt32 | Specifies a language for the solution when a solution language package is deployed. If this parameter is not specified, zero ("0") is assumed. Use zero for solutions that are valid for all languages. | ||
| Synchronize | Optional | System.Management.Automation.SwitchParameter | Synchronizes all solutions or the specified solution in the local farm. | ||
| WhatIf | Optional | System.Management.Automation.SwitchParameter | Displays a message that describes the effect of the command instead of executing the command. For more information, type the following command: get-help about_commonparameters |
Detailed Description
This cmdlet contains more than one parameter set. You may only use parameters from one parameter set, and you may not combine parameters from different parameter sets. For more information about how to use parameter sets, see Cmdlet Parameter Sets.
The Install-SPSolution cmdlet deploys an installed SharePoint solution in the farm. Use the Add-SPSolution cmdlet to install a SharePoint solution package in the farm.
The following table lists the valid values for the CompatabilityLevel parameter:
| Value | Result |
| 14 | Installs solution to 14 directories only |
| 15 | Installs solution to 15 directories only |
| “14,15” | Installs solution to both 14 and 15 directories |
| “AllVersions” or “All” | Installs solution to both 14 and 15 directories |
| “OldVersions” or “Old” | Installs solution to 14 directories only |
| “NewVersion” or “New” | Installs solution to 15 directories only |
Input Types
Return Types
------------------EXAMPLE 1------------------
Install-SPSolution -Identity contoso_solution.wsp -GACDeployment
This example deploys the installed SharePoint solution contoso_solution.wsp in the farm and specifies that GAC can be deployed for the new SharePoint solution.
------------------EXAMPLE 2------------------
Install-SPSolution -Identity contoso_solution.wsp -GACDeployment --CompatibilityLevel 15
This example deploys the installed SharePoint solution contoso_solution.wsp in the farm within the latest version directories and specifies that global assembly cache (GAC) can be deployed for the new SharePoint solution.
------------------EXAMPLE 3------------------
Install-SPSolution -Identity contoso_solution.wsp -GACDeployment -CompatibilityLevel {14,15}
This example deploys the installed SharePoint solution installs a previously added solution so it can be used correctly in both 14 and 15 mode site collections.
Change History
| Date | Description |
|---|---|
| October 30, 2012 | Added table with values for the CompatibilityLevel parameter. |
| July 16, 2012 | Initial publication |

Note: