10 Replies Latest reply on Dec 16, 2014 11:43 AM by James Donohue

    Script to automatically create Smart Groups

    James Donohue



      We have a ton of Smart Groups (100's) that need to be created since the environment is massive. Just as an example, we have approx. 10 different SDLC environments, 45 different Business Units and each Business unit contains approx. 40 'Server-Types' which define the roles and certain software that is on them. Additionally, we have several different in OS's (Windows, Linux) and different versions of OS's.


      To make this more complicated, different Engineering and support groups are responsible for each Business Unit so they will need to run Componet Discovery and various jobs on their respective BU Servers. A seperate central group will create most of the Component Templates for these Teams but they will be responsoble for the job creation/executions. It seems the only reasonable way for everyone to efficiently use BSA is to create Smart Groups that represent all Servers and their respective place in the Organization. To do this would require the creation of hundreds of Smart Groups at minimum.


      When I create 1 Smart Group, it takes me between 5-10 minutes. It's easy to create but opening and choosing the Properties and saving  takes a long time for some reason. I'm proficient in Windows scripting languages but a beginner in BLCLI and NSH. Is there any scripts out there that would allow me to automatically create these Smart Groups based off a csv / or text file with the data definitions in them?


      Ultimately, I would like to create a script that reads one or more text files and creates the Smart groups based on the data in the files, and being that I do not have a scripting environment outside of BSA, I'm wondering if I can run it inside the Console. . . .  


      Inititially, the Smart Groups I'm looking to create is for Servers and Components. That's a LOT of Smart Groups - lol.    


      Any help is appreciated.