Latest script (Agent Configuration - Join PC to Domain (2.1) available for Automate contained in zip below for download.
Change due to Automate 2021 Patch 6 - where Line 2 changed to Resend System Information instead of Resend Hardware to get computer name.
If still on Automate 2021.5 or lower you can still use Agent Configuration - Join PC to Domain (2.0)
Setup
Unzip to folder on your computer or the Automate server.
Open Control Center client - to import go to System>General>Import>XML Expansion.
Browse to the Agent Configuration - Join PC to Domain (2.0).xml file and then click Open. Then click Yes to import.
Next reload system cache then open Toolshed 2.0 to add the new script to your configuration profile(s) and remove the original Join PC to Domain script.
Once the profile has been saved, the next deployment using that profile will perform the Join Domain function.
Usage
The Join Domain script will automatically join the domain found in the Automate Client where the agent was installed (This is set in the OneTouch Deployment). As long as you only have a single domain in this client, it will find an online domain controller to perform the join function.
If you have a client with multiple domains, please contact support for guidance on customizing the script to handle this scenario.