Tool for Creating Additional Workers on Windows

  • 7019813
  • 24-Feb-2016
  • 07-Aug-2017


Retain 3.5.1, 4.0 Windows 2008R2, 2012


Is there an easier way to create multiple workers on Windows?


Note:  In Retain 4.1, the Retain for Windows installer will support the installation of multiple Workers by adding /AddWorker to the command line.  But until then, Support has created a tool to assist you in creating additional worker on Windows.

This script allows the user to add additional RetainWorkers to a server that has at least one RetainWorker installed on it (usually ~\RetainWorker).

Run the script from ~\Beginfinite\Retain\ as administrator and enter the number of new workers to add, up to nine (9). You may select 0 to exit without adding workers.

This script requires Powershell 4.0 or higher.
You may have to set the execution policy to allow this script to run:
Set-ExecutionPolicy -Scope Process -ExecutionPolicy AllSigned

This tool adds workers consecutively from the pre-existing workers using RetainWorker\ as the base. e.i. RetainWorker1, RetainWorker2, and so on. This is very useful when setting up a Retain Worker server that only has worker objects on it.

If you have created too many workers you need only delete the
~\Beginfinite\Retain\Tomcat 7.0\conf\Catalina\localhost\RetainWorkerN.xml file and
~\Beginfinite\Retain\RetainWorkerN folder that are not needed.
For example, if you create workers 0-5 but already named the first worker in the Web Console Worker1 you can delete RetainWorker1 so the numbers match up.

If you have upgraded Retain you will need to replace the existing RetainWorkers. You need to keep RetainWorker\ which was upgraded by the installer as the script uses that as the base for the other workers. You need only delete the ~\Beginfinite\Retain\Tomcat 7.0\conf\Catalina\localhost\RetainWorkerN.xml file and ~\Beginfinite\Retain\RetainWorkerN folders that you are replacing.

Additional Information

This article was originally published in the GWAVA knowledgebase as article ID 2752.