Launchctl load -w /System/Library/LaunchDaemons/ssh. ADUSERNAME and ADPASS should be a user with sufficient privilages to add the computers to the domain. Please set HOST, DOMAIN, ADUSERNAME, and ADPASS to match the information for your domain. You can edit the script to take out the M before "$SN", or you can append anything else you'd like onto it, such as an asset take or location.
Note: the template we are using to name our Macs is the letter 'M' followed by the serial number. The computer ID is the computer name that will show up in Active Directory once the Mac is joined to the domain. For this example the domain is hq. and the computer ID is Mac. Here you can enter your domain information and computer ID.
click the Lock to make changes Make sure Active Directory is checked, highlight it, and then click the Pencil to edit this setting.
There will either be a 'Bind' or an 'Unbind' button.If you see an 'Unbind' button, it. Click the Open Directory Utility button You should now be at the Directory Utility. Make sure 'Active Directory' has a checkmark. If needed, unlock the utility, by clicking on the lock icon. Select Domain, type the domain name of the AD server you want to join and click OK. Under the Computer Name tab, click on the Change button. Type sysdm.cpl and hit Enter to launch System Properties. Press the Windows key + R to open the Run command box.
Open Applications > Utilities > Directory Utility >. Method 1: Add Windows 10 to Domain from System Properties. Click the Open Directory Utility button You should now be at the Directory Utility. Here is a script we are using as a post-installation task to enable SSH, set the computer name, and then join the computer to our Active Directory managed domain. Login with a local administrative account to the computer.