Automated LDAP and Search setup on Catalina

The easy way is to make a configuration profile and push it via MDM once you reach the break even point where you’re spending more time touching machines vs scripting solutions.

  • https://support.apple.com/guide/mdm/directory-mdm23422775/web

You don’t need an MDM to make these or could use server app as your MDM if you just want to manage a couple items past this, but most teams that have staff to run LDAP would want MDM as well.

You could script downloading your profile from any file share using curl but it’s also possible to just script your MDM enrollment and push the profile to the Macs that need it using APNS.