dev.rean.me
windows-server

09 - Windows Server 2012 Join Domain Using Command Line (Video in Khmer)

Learn how to join domain using command line on Windows Server 2012 R2 step-by-step with video tutorial in Khmer and tips for beginners.

2026-09-10 ยท 3 min read

Share:

Hello my friend! Today I show you step-by-step how to Join Domain Using Command Line on Windows Server 2012 R2 inside VMware! Using Command Prompt to join domain is super fast and very useful for system administrators! Very easy to follow with video tutorial in Khmer! Let's get started!

๐Ÿ’ก Tip: You must run these commands on Windows Client PC (Windows 7 / 8 / 10 / 11) that you want to join to domain, NOT on the Domain Controller server!

Step 1: Open Command Prompt as Administrator

  1. On client computer, click Start menu > type cmd in search box.
  2. Right-click Command Prompt icon > select Run as administrator.

Step 2: Configure Static IP & Primary DNS Server

Before joining domain, client PC must point its Primary DNS to Domain Controller IP address:

  1. Set static IP address and gateway:
    netsh interface ipv4 set address name="Ethernet" static 192.168.1.50 255.255.255.0 192.168.1.1
    
  2. Set DNS server to Domain Controller IP (example: 192.168.1.10):
    netsh interface ipv4 set dns name="Ethernet" static 192.168.1.10
    

๐Ÿ’ก Tip: Always test DNS connection by typing ping mydomain.local in command prompt first! If ping fails, check your DNS IP address before trying to join domain!

Step 3: Join Domain Using netdom Command

Type netdom command in Command Prompt (replace with your domain name and Administrator password):

netdom join %computername% /domain:mydomain.local /userd:Administrator /passwordd:YourPassword123 /reboot:5

Command explanation:

  • %computername%: Auto-detects current client computer name.
  • /domain:mydomain.local: Replace with your domain name.
  • /userd:Administrator: Domain administrator username.
  • /passwordd:YourPassword123: Domain administrator password.
  • /reboot:5: Automatically restarts computer after 5 seconds!

Wait for success message: "The command completed successfully."

Step 4: Restart Computer

If you did not use /reboot:5 flag in command, restart client computer manually:

shutdown /r /t 0

๐Ÿ’ก Tip: After computer reboot finished, press Ctrl + Alt + Delete and select Switch User or Other User to log in with domain user account (example: mydomain\sok.sao)!

Watch Video Tutorial (Khmer)

Watch full step-by-step video tutorial below to see complete process in Khmer:

Hope this tutorial help you join domain using command line on Windows Server 2012 R2 easily! Practice command line server administration today. Happy learning my friends! Sharing is caring!