ZCM 11.x does not provide a scripting method for administrators to create multiple Dynamic Workstation Groups from a template. This script makes it easier for administrators to create multiple Dynamic groups from a template which includes, group name, group path, filter (device-hostname) and description.
The script is currently available only for Oracle database (SQL Server soon to follow)
Please post a comment for any specific template requests.
Refer to the README before using.
How to use:
Important: Take a reliable back up of the database before running the script.
Creating the template file
- Using any preferred spreadsheet software create a txt file (called requirement.txt) to contain the following information (Dynamic Group Name, Dynami Group Path, Hostname filter, Description of the group)
- Follow the following format for the requirement.txt file: Group_Name1,/~Devices~/~Workstations~/Folder,HostName1,Description[no commas inside description] See: dgtemplate_example.csv
- Place dynamic_group.py and requirement.txt in the same location
- Run: python dynamic_group.py
- dgtemplate.csv will be created in the above location
Running the Dynamic Group Create procedure in Oracle 11g on a Unix/Linux server. ZCM server can be running on either Windows or Linux
- DG folder has to be created by the Oracle user or any user that oracle database will have rights to.
- Copy dgtemplate.csv to /tmp/Dynamic_Group, make sure Oracle has rights to the file
- Run using any sql client DynamicGroupAuto.sql (make sure to edit the sql file in case the zenworks user is different from zenadmin [search the script for zenadmin])