Install-SPSolution
Deploys an installed SharePoint solution in the farm.
Syntax
Install-SPSolution
[-Identity] <SPSolutionPipeBind>
[-AllWebApplications]
[-AssignmentCollection <SPAssignmentCollection>]
[-CASPolicies]
[-CompatibilityLevel <String>]
[-Confirm]
[-Force]
[-FullTrustBinDeployment]
[-GACDeployment]
[-Language <UInt32>]
[-Local]
[-Time <String>]
[-WebApplication <SPWebApplicationPipeBind>]
[-WhatIf]
[<CommonParameters>]
Install-SPSolution
[[-Identity] <SPSolutionPipeBind>]
[-AssignmentCollection <SPAssignmentCollection>]
[-Confirm]
[-Language <UInt32>]
[-Synchronize]
[-WhatIf]
[<CommonParameters>]
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 (https://zcusa.951200.xyz/powershell/scripting/developer/cmdlet/cmdlet-parameter-sets?view=powershell-5.1).
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.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the online documentation at SharePoint Server Cmdlets.
Examples
------------------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 {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.
Parameters
-AllWebApplications
Specifies that the new SharePoint solution is deployed for all SharePoint web applications in the farm.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server Subscription Edition |
-AssignmentCollection
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.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: | SPAssignmentCollection |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Applies to: | SharePoint Server Subscription Edition |
-CASPolicies
Specifies that code access security (CAS) policies can be deployed for the new SharePoint solution.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server Subscription Edition |
-CompatibilityLevel
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.
Valid values are:
--14
--15
--14,15
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server Subscription Edition |
-Confirm
Prompts you for confirmation before executing the command.
For more information, type the following command: get-help about_commonparameters
Type: | SwitchParameter |
Aliases: | cf |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server Subscription Edition |
-Force
Forces the deployment of the new SharePoint solution.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server Subscription Edition |
-FullTrustBinDeployment
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
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server Subscription Edition |
-GACDeployment
Specifies that global assembly cache (GAC) can be deployed for the new SharePoint solution.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server Subscription Edition |
-Identity
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.
Type: | SPSolutionPipeBind |
Position: | 1 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Applies to: | SharePoint Server Subscription Edition |
-Language
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.
Type: | UInt32 |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server Subscription Edition |
-Local
Deploys the solution on the active server.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server Subscription Edition |
-Synchronize
Synchronizes all solutions or the specified solution in the local farm.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server Subscription Edition |
-Time
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.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server Subscription Edition |
-WebApplication
Deploys the SharePoint solution for the specified SharePoint web application.
The value must be in one of the following forms:
--An authentic GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh
--An authentic name of a SharePoint web application (for example, MyOfficeApp1)
--An instance of an authentic SPWebApplication object.
Type: | SPWebApplicationPipeBind |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server Subscription Edition |
-WhatIf
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
Type: | SwitchParameter |
Aliases: | wi |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server Subscription Edition |