Install a Feature in SharePoint


Scenario/Problem: You need to install a feature to SharePoint.


Solution: Use the Install-SPFeature cmdlet with the -Path parameter.

The Install-SPFeature cmdlet enables you to install a feature that already has been copied or deployed to the SharePoint environment. The feature files should reside within a folder under the 14TEMPLATEFEATURES location of the SharePoint servers. The folder that contains the feature files is used as the -Path parameter with the Install-SPFeature cmdlet, as shown in Listing 9.24.

Listing 9.24. Sample Script for Installing a Feature


Install-SPFeature -Path "CustomFeature" -Force


The -Force switch parameter forces the installation and does not produce any errors if the feature has already been installed.


Note

The feature scope is contained within the feature.xml file and therefore no other parameters are required to perform the installation. The feature is available at the level of its scope.


..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.221.245.196