How to join a domain using powershell

Forums: 


To join a domain using powershell, use the following command:

Add-Computer -ComputerName mycomputername -DomainName mydomain -Credential mydomain\Administrator