NSH Scripts for exporting/importing Server Smart Groups

Version 2

    These two scripts can be used in order to replicate Server Smart Groups across multiple environments.


    They can also be used if you want to keep a set of Server Smart Groups on your pc and you want to be able to easily recreate them on a new platform.



    The first script “export_smart_groups.nsh” exports all the smart groups recursively found under the Server Workspace $STARTPATH location onto the filesystem directory $DESTDIR.


    “/” can be used as $STARTPATH, so that the entire folders tree in the Servers Workspace can be exported.


    The second script “import_smart_groups.nsh” creates or updates the smart groups found in the file system folder $SRCDIR , matching the pattern $PATTERN, into the Servers Workspace location specified in the corresponding mapping.xml files. The file mapping.xml is expected to be found under $i, i.e. any folder matching the $SRCDIR/$PATTERN location