-
Notifications
You must be signed in to change notification settings - Fork 107
SPFeature
Brian Farnhill edited this page Jun 2, 2016
·
18 revisions
Parameters
Parameter | Attribute | DataType | Description | Allowed Values |
---|---|---|---|---|
Name | Key | string | The name of the feature | |
FeatureScope | Required | string | The scope to change the feature at - Farm, WebApplication, SiteCollection or Site | Farm, WebApplication, Site, Web |
Url | Key | string | The URL to change the feature at | |
Ensure | Write | string | Present if the feature is to be enabled, Absent if it is to be disabled | Present, Absent |
Version | Write | string | The version of the feature to check against | |
InstallAccount | Write | String | POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsAccount if using PowerShell 5 |
Description
This resource is used to make sure that a specific feature is either enabled or disabled at a given URL/scope. The Ensure property will dictate if the feature should be on or off. The name property is the name of the feature based on its folder name in the FEATURES folder in the SharePoint hive directory.
Example
SPFeature EnableViewFormsLockDown
{
Name = "ViewFormPagesLockDown"
Url = "http://www.contoso.com"
Ensure = "Present"
Scope = "Site"
PsDscRunAsCredential = $SetupAccuount
Version = "1.0.0.0"
}
- 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