Edit

Share via


Install-SPSolution

Deploys an installed SharePoint solution in the farm.

Syntax

Deploy

Install-SPSolution
    [-Identity] <SPSolutionPipeBind>
    [-AllWebApplications]
    [-AssignmentCollection <SPAssignmentCollection>]
    [-CASPolicies]
    [-CompatibilityLevel <String>]
    [-Confirm]
    [-Force]
    [-FullTrustBinDeployment]
    [-GACDeployment]
    [-Language <UInt32>]
    [-Local]
    [-Time <String>]
    [-WebApplication <SPWebApplicationPipeBind>]
    [-WhatIf]
    [<CommonParameters>]

Synchronize

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://learn.microsoft.com/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

Applicable: SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019

Specifies that the new SharePoint solution is deployed for all SharePoint web applications in the farm.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

Deploy
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-AssignmentCollection

Applicable: SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019

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.

Parameter properties

Type:SPAssignmentCollection
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

-CASPolicies

Applicable: SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019

Specifies that code access security (CAS) policies can be deployed for the new SharePoint solution.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

Deploy
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-CompatibilityLevel

Applicable: SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019

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

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

Deploy
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Confirm

Applicable: SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019

Prompts you for confirmation before executing the command. For more information, type the following command: get-help about_commonparameters

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False
Aliases:cf

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Force

Applicable: SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019

Forces the deployment of the new SharePoint solution.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

Deploy
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-FullTrustBinDeployment

Applicable: SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019

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

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

Deploy
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-GACDeployment

Applicable: SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019

Specifies that global assembly cache (GAC) can be deployed for the new SharePoint solution.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

Deploy
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Identity

Applicable: SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019

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.

Parameter properties

Type:SPSolutionPipeBind
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

Deploy
Position:1
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False
Synchronize
Position:1
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

-Language

Applicable: SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019

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.

Parameter properties

Type:UInt32
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Local

Applicable: SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019

Deploys the solution on the active server.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

Deploy
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Synchronize

Applicable: SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019

Synchronizes all solutions or the specified solution in the local farm.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

Synchronize
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Time

Applicable: SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019

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.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

Deploy
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-WebApplication

Applicable: SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019

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.

Parameter properties

Type:SPWebApplicationPipeBind
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

Deploy
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-WhatIf

Applicable: SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019

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 properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False
Aliases:wi

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.