I have it working except for one line.
When I add groups to Allowed Admin groups in the script, I try to list 3 groups as admingroups="domain admins, enterprise admins, tier2-support" as the variable and use /usr/sbin/dsconfigad -groups $admingroups as the command. It doesnt seem to like the space in the group name because it ends up adding just "domain" in the Admin groups. Do I need another set of parentheses or brackets?
Also I was comparing results with computers that were bound during imaging by running dsconfigad -show on various computers. I noticed on existing computers that are already bound to AD, some computers have Packet signing and Packet encryption as "allow" and some have it as "disable." Now I'm not sure which option to use in my script. I'm not exactly sure what these settings do.
Thanks