dsconfigad -a hostname -u DomainAdminsUserName -p Password --ou "CN=ComputerName,DC=Corp,DC=Domain" -domain Corp.Domain -mobile enable -mobileconfirm enable -localhome enable -useuncpath enable -groups "Domain Admins,Enterprise Admins, Domain Users" -alldomains enable
reboot