Vadim Tabakman

Jump to bottom

I recently encountered a question about how to automatically enable the Nintex Workflow Site Feature on all the subsites under a root site in a Site Collection.  This isn't the first time it has been asked of me, so I thought I'd create a simple PowerShell script to do it.

It's not complex.  It just recursively goes through all the sites under a particular site.

$web = get-spweb http://ntx-vadim3

function EnableNintexWorkflowSiteFeature( $w )
{
    $ws = $w.Webs;
    foreach( $subweb in $ws)
    {
        EnableNintexWorkflowSiteFeature($subweb)
    }
    echo 'Enabling Nintex Workflow on site : ' $w.Url
    Enable-SPFeature NintexWorkflowWeb -url $w.Url
}

echo 'Enabling Nintex Workflow on site : ' + $web.Url
EnableNintexWorkflowSiteFeature $web

Usage

The PowerShell script currently needs to be updated, since I've hardcoded the url.  But it's easily updated to run on your site.  You could also make it take a parameter but I haven't done so here, since I'm writing this at 1am.

Open the SharePoint Management Shell.

Navigate to the folder where you put the script.

Run it like this:

.\EnableNWOnSubSites.ps1

It should be an easy update if you want to disable the site feature.

Downloads

Posted by Vadim Tabakman Saturday, July 14, 2012 1:37:00 AM Categories: Nintex Nintex Workflow PowerShell
Copyright Vadim Tabakman
Rate this Content 2 Votes

Comments

Monday, July 16, 2012 4:45:11 AM
Dan

re: Nintex Workflow - Enable the Nintex Workflow Feature on all Subsites

Will this work with Forms ?? And how can you tell every List automaticlly to use Nintex Forms without having to go to every list and select the norms button and publishing it ?  :)

Monday, July 16, 2012 10:06:20 AM

re: Nintex Workflow - Enable the Nintex Workflow Feature on all Subsites

You can do the same sort of thing with Nintex Forms.  Nintex Forms has about 3 Site collection features that you would need to enable.

Nintex Forms 2010 Prerequisites Feature

Nintex Forms 2010 for SharePoint List Forms

Nintex Forms 2010 for Nintex Workflow

I'm afraid I haven't figured out how to programmatically configure each list to use Nintex Forms.  But if I do, I'll update this post.

Thursday, August 16, 2012 10:48:53 AM

re: Nintex Workflow - Enable the Nintex Workflow Feature on all Subsites

the script has a small bug, use $w instead of $subweb

use this:

$web = get-spweb http://portal.phytoneering.global/

function EnableNintexWorkflowSiteFeature( $w )
{
$ws = $w.Webs;
foreach( $subweb in $ws)
{
EnableNintexWorkflowSiteFeature($subweb)
}
echo 'Enabling Nintex Workflow on site : ' $w.Url
Enable-SPFeature NintexWorkflowWeb -url $w.Url
}

echo 'Enabling Nintex Workflow on site : ' + $web.Url
EnableNintexWorkflowSiteFeature $web

Thursday, August 16, 2012 11:10:59 AM

re: Nintex Workflow - Enable the Nintex Workflow Feature on all Subsites

Hey Christian,

thanks for catching that. I'll update the post.

cheers,

Vadim

You must sign in to this site to post comments.
Already Registered?
Sign In
Not Yet Registered?
Register





 

Statistics

  • Entries (246)
  • Comments (1725)

Categories