Tag Archives: microsoft sharepoint

Managing SharePoint feature state with PowerShell

This is a small function that wraps the Get-SPFeature, Enable-SPFeature and Disable-SPFeature to control state of farm, site or web scoped features. I makes it a breeze to set the state of the built-in SharePoint features during a PowerShell deployment. function EnsureFeatureState( [Parameter(Mandatory=$true, Position=0)] [string] $id, [Parameter(Mandatory=$true, Position=1)] [bool] $enabled, [Parameter(Mandatory=$false, Position=2)] [string] $site) { […]

Follow

Get every new post delivered to your Inbox.