Kaseya Community

Script to change Machine Group based on variable?

  • We have over 500 machines on a single network, and multiple departments. I'm trying to come up with a way to automate (in some way) the machine group, using the Naming Policy is not going to work. So my idea is to create a text file on the root of "c" and place the name of the department in the text file, create a variable with the content and then change the machine group based off that variable. I've spent some time combing the forums but I have yet to come across anyone else who's tried this.

    Thoughts?

    - Josh

  • Easiest way to do this is by using the naming policy. If its not working like it should then open a ticket with support.

  • Hi Joshua,

    You could have a script which changed the group by analysing the system script which does it or by making some sort of bat file which stopped kaseya edited the ini file and started it again. Run this across all machines and based on the local file it would put them in x group. Failing that you could probably run a forced update of the agent with a /g command and it should move the group but might create duplicate agents. Would need some testing.

    Etabush: I assume naming policy does not work as they are all on the same network ip range with the same gateway.

  • We have over 500 machines on a single network - I really hope you don't mean someone designed a flat network without vlan's thats over 500 machines strong or they need to be taken behind the barn and given a kick in the junk for being stupid.

    The broadcast traffic in a network that size will be horrible....

  • Personally I find its better to only use machine groups per network or geographic location which how the Naming Policy was designed to be used.

    I would suggest an alternative option of using view filters;

    If you have your AD structured by sorting either the Computers or the User account by Department OU (user accounts also have a department field in AD), you could query AD via the installed agent and fill out a custom field logging the department that each machine is used by. Then you can create filters for each department that will look for the custom field value. The down sides with this method are;

    1. machines share between departments
    2. Users that work in multiple departments