Join Domain with Command Line

  Disable Firewall

netsh advfirewall set allprofiles state off
Copied!

  Clear the DNS resolver cache

ipconfig /flushdns
Copied!

  Check what IP address or DNS information of your domain name

nslookup sopuol.com.kh
Copied!

  Join Domain

Add-Computer -DomainName "sopuol.com.kh" -Credential sopuol\administrator
Copied!

  Rename Computer

wmic computersystem where name="%computername%" call rename name="WIN7"
Copied!

  Restart Computer

shutdown /r /t 0
Copied!

  Restart Computer

restart-computer
Copied!