Skip to main content
Nintex Community Menu Bar

You can use the NWAdmin PowerShell snap-in available through the SharePoint 2013 Management Shell on your SharePoint 2013 server with Nintex Workflow installed. You can use NWAdmin and the ExportWorkflow and DeployWorkflow commands to export and deploy a Nintex workflows using a script.

 

You can use the command in migration scripts to move your Nintex solution, in scripts to move your workflows from a development to production environment, or any other situation where programatic access to the workflow will make your work easier.

 

In this post we will walk through how to access the NWAdmin PowerShell tool on a SharePoint server with Nintex Workflow installed, and then export the workflow, and then deploy the workflow to a new list.

 

Contents

 Table of contents

Export a workflow

You can use PowerShell to export a workflow from SharePoint as a workflow file.

To export a list workflow you will need to have the following pieces of info:

  • Source site URL
  • Workflow name
  • Filename and path where you would like to save the workflow file (.nwf)
  • Source list name
  • Account credentials and domain

  1. Open the SharePoint 2013 Management Shell on your SharePoint 2013 development environment.
  2. In the shell, type the following command adding your specific information for the parameters.
NWAdmin.exe -o ExportWorkflow -siteUrl targetSiteUrl -workflowName workflowName 
-filename fileToSave -workflowType list -list listName -username username
-password password -domain domain‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍

If you have questions about the command and its paramters, you can find more information in the NWAdmin Guide.

Navigate to your local directory to find the workflow file (.nwf) that you have exported.

 

 

Deploy a workflow

You can use PowerShell to deploy a workflow with a local workflow file to SharePoint.

To deploy a list workflow if you have the following pieces of info:

  • Target site URL
  • Workflow name
  • Filename and path to the workflow file (.nwf)
  • Target list name
  • Account credentials and domain

  1. Open the SharePoint 2013 Management Shell on your SharePoint 2013 development environment.
  2. In the shell, type the following command adding your specific information for the parameters.
NWAdmin.exe -o DeployWorkflow -workflowName workflowName -nwfFile fileToSave
-siteUrl targetSiteUrl -targetList targetList -saveOnly -saveIfCannotPublish
-overwrite -skipValidation -username username -password password -domain domain‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍

If you have questions about the command and its parameters, you can find more information in the NWAdmin Guide.

You can then open SharePoint, navigate to the list, and find the workflow.

And that is how your use those two commands. You can find more detail about those commands and other commands in the SharePoint Powershell Snap In in the Nintex Workflow Administration Guide.

Thanks!

When will users have similar tools for Office 365?


You can access the Nintex 0365 API via RESTful client, or using Powershell if you like. Here is more information about the API. Does that address what you are looking for? If not, let me know. Thanks! Matt

RE: Using the Office 365 API for Workflows and Forms


Awesome!

‌ check this out


Does this process copy the list also, or does that need to be created separately?


Hello, excelent article! Thanx for this.

Just one question. Does Deploy workflow operation also publish the workflow or is there another operation which needs to be used? In the screenshot you have included I can see the workflows being in draft state (not published).

Thanx

Jan


Reply