Products: Nintex Workflow 2013, Nintex Workflow 2010
A request came in a few days ago for a way to programmatically toggle Nintex Features for all Site CollectionsSites that utilize Nintex Workflow in a given Web Application
This PowerShell script will disable and then re-enable all Nintex Features in the WebApplication (as long as they were previously enabled).
PowerShell Script |
---|
- Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue
-
- $NWSiteFeature = '0561d315-d5db-4736-929e-26da142812c5'
- $NWWebFeature = '9bf7bf98-5660-498a-9399-bc656a61ed5d'
-
- foreach($feature in $(Get-SPWebApplication -Identity http://contoso.com).QueryFeatures(uGuid]$NWSiteFeature)){
-
- Write-Host "Processing $($feature.Parent.Url)"
-
- Disable-SPFeature -Url $feature.Parent.Url -Identity $NWSiteFeature -Confirm:$false
-
- Enable-SPFeature -Url $feature.Parent.Url -Identity $NWSiteFeature
-
- foreach ($webFeature in $feature.Parent.QueryFeatures(FGuid]$NWWebFeature)){
-
- Write-Host "Processing $($WebFeature.Parent.Url)"
-
- Disable-SPFeature -Url $webFeature.Parent.Url -Identity $NWWebFeature -Confirm:$false
-
- Enable-SPFeature -Url $webFeature.Parent.Url -Identity $NWWebFeature
-
- Write-Host "Completed $($WebFeature.Parent.Url)"
-
- }
-
- Write-Host "Completed $($feature.Parent.Url)"
-
- }
|
|
To use the script do the following:
- Replace http://contoso.com with the URL of the WebApplication you wish to execute the script against.
Version History and other scripts can be found here: http://alps.codeplex.com