amccollough

PowerShell script to export all workflows to .nwf files

Blog Post created by amccollough on Apr 14, 2016

I put together a PowerShell script which will allow you to export all Nintex Workflow files in a site to .nwf files. The script is attached. Here is a snip from the comments in the code. There might be easier or more elegant ways of accomplishing this, but this works for me.

 

PURPOSE:

I export the workflows listed in the "Export
Table to CSV" .csv file saved here.

This is so that you have a backup of the
workflows, and so that you can more easily import them elsewhere.

 

PREREQUISITES:

Your Web Front End ("WFE") has NWAdmin.exe available on it

You can Remote Desktop or get local console to the WFE

You have sufficient permissions to export Nintex workflows from the site in question

You have sufficient permissions to create directories on the WFE and execute NWAdmin.exe

 

INSTALLATION INSTRUCTIONS:

Create a "backups" directory on your Web Front End server where you want workflows for your site exported to. The particular location and name is not critical.

Place a copy of this script into the directory you just created.

 

HOW TO USE:

Start by web browsing to the site in question, and going to the Nintex Site Workflow Inventory page. This is found at
{site}/_layouts/NintexWorkflow/WorkflowGallery.aspx

On the page at the top, click the "Export table to CSV" link.

Save the exported "Workflow-Inventory.csv" file to the same directory as this script.

Log in to the WFE, either via Remote Desktop or local console.

Launch a SharePoint 2010 Management Shell session.

CD to the "backups" directory containing this script.

Run this script. It will export all the workflows as .nwf files into this same directory.

Alternatively, if you are using the windows Explorer, you can navigate to this script, right-click on it, and pick "Run with PowerShell".

 

TESTING:

Tested on a WFE running Windows 2008 Server Enterprise SP2, SharePoint Server 2010 (latest patch level), with Nintex Workflow 2010 (2.4.7.10).

 

DISCLAIMER:

This script is released to the public domain with no warranties at all. Use entirely at your own risk.

Outcomes