-
Notifications
You must be signed in to change notification settings - Fork 107
SPFarmSolution
dscbot edited this page Mar 17, 2023
·
19 revisions
Parameter | Attribute | DataType | Description | Allowed Values |
---|---|---|---|---|
Name | Key | String | The filename of the WSP package | |
LiteralPath | Required | String | The full path to the WSP file | |
WebAppUrls | Write | StringArray[] | A list of the web applications to deploy this to | |
Ensure | Write | String | Present if the WSP should be deployed, or Absent if it should be removed |
Present , Absent
|
Version | Write | String | The version of the package that is being modified | |
Deployed | Write | Boolean | Should the solution be deployed to the farm, or just installed to the farm | |
SolutionLevel | Write | String | What compatability level should the WSP be deployed as? |
14 , 15 , All
|
Type: Distributed Requires CredSSP: No
This resource is used to make sure that a specific farm solution is either present or absent in a farm. The solution can be deployed to one or more web application passing an array of URL's to the WebApplications property. If the solution contains resources scoped for web applications and no WebApplications are specified, the solution will be deployed to all web applications. If the solution does not contain resources scoped for web applications the property
The default value for the Ensure parameter is Present. When not specifying this parameter, the solution is deployed.
This example shows how to deploy a WSP to specific web applications.
Configuration Example
{
param
(
[Parameter(Mandatory = $true)]
[PSCredential]
$SetupAccount
)
Import-DscResource -ModuleName SharePointDsc
node localhost
{
SPFarmSolution SampleWsp
{
Name = "MySolution.wsp"
LiteralPath = "C:\src\MySolution.wsp"
Ensure = "Present"
Version = "1.0.0"
WebAppUrls = @("http://collaboration", "http://mysites")
PsDscRunAsCredential = $SetupAccount
}
}
}
- Home
- Getting Started
- Pre-requisites
- Installing the module
- Exporting SharePoint Configuration
- Creating Configuration Files
- Pre-created Examples
- Creating an Azure development environment
- Understanding Resources & Syntax
- Remote PowerShell Authentication
- Contributing to SharePointDsc
- Other useful modules for SharePoint DSC configurations