Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

how to activate content organizer feature from c# code or by powershell script. I want to activate this feature on my subsite from my code ?

share|improve this question
add comment

1 Answer 1

up vote 2 down vote accepted

PowerShell:

if ((Get-PSSnapin -Name Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue) -eq $null)
{
    Add-PsSnapin Microsoft.SharePoint.PowerShell
}

$DocumentRoutingFeatureId = "7ad5272a-2694-4349-953e-ea5ef290e97c"
Enable-SPFeature -Identity $DocumentRoutingFeatureId -Url $url -ErrorAction Stop

where $url corresponds to Url of web, since the scope of this feature is Web

Btw, you could find the summary table with information about features (Display Name,Title,ID,Scope) available in SharePoint 2010 in post Features and their GUID’s in SP2010

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.