mattbriggs

Export and Deploy a Nintex Workflow with PowerShell

Blog Post created by mattbriggs Employee on Oct 14, 2016

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

 

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!

Outcomes