Add Computer to Static Computer Croup via Casper Imaging

hinrichd
New Contributor III

Hi All.

Is there a way to assign a coumputer to a static computer group druing imaging with Casper Imaging. It would be nice to have a Group Assignmant Tab where you can select the groups the computer belong to.

Thanks for any tips.

5 REPLIES 5

mm2270
Legendary Contributor III

No way to do it I know of in Casper Imaging, so you should probably submit a Feature Request (might already be one submitted). There is always the API in a script which allows you to add computers to Static Groups, but I'm not sure if the script would need to run after the first boot of the device to work or if it could run during imaging to do it.

stevevalle
Contributor III

When imaging is started, a blank record for that computer is added to Casper admin. The name of the computer is all that is added to the record until after imaging has completed.

Therefore, you could create a smart group and set the criteria to Computer Name IS xxxxx01, etc. The computer record would be added to the smart group before imaging has completed.

e56539aa8c8743f2a85697e152f2eccc

I do this with my test machine. If I delete the computer record from Casper, it is removed from the smart group. Once imaging has kicked off, the computer appears back in the smart group and policies assigned to that smart group continue to deploy!

davidacland
Honored Contributor II
Honored Contributor II

The only way to automatically do it now would be an API script. Not sure if thats something you want to look at getting set up though?

Josh_Smith
Contributor III
There is always the API in a script which allows you to add computers to Static Groups

I haven't used that API, but it sounds like you could:

  1. Create one script for each static group (script uses the API to add the Mac to the group)
  2. Set the scripts to run at reboot, but don't add them to your configuration
  3. Add the computer to the static group in Casper imaging by clicking Customize and selecting the appropriate script

hinrichd
New Contributor III

Thanks all for your help.
Using the Casper API may solve that issue but it is still to complex (for me) as you have to always create a new script if someone creates a new static group. So, i will stay on adding Computer to static groups after Imaging via the JSS.

Thanks all