
Active Directory คืออะไร?
Active Directory (AD) คือ Directory Service ของ Microsoft ที่ใช้จัดการทรัพยากรต่างๆ ในเครือข่ายองค์กร ไม่ว่าจะเป็น User Account, Computer, Printer, File Share, Security Policy และอื่นๆ ทั้งหมดจากศูนย์กลาง Active Directory เปรียบเสมือน “สมุดโทรศัพท์” ขนาดใหญ่ที่เก็บข้อมูลทุกอย่างเกี่ยวกับทรัพยากรในเครือข่ายไว้ในฐานข้อมูลเดียว
Active Directory ทำงานบนโปรโตคอล LDAP (Lightweight Directory Access Protocol) และ Kerberos สำหรับการ Authentication ซึ่งเป็นมาตรฐานสากลที่ใช้กันทั่วโลก ทำให้ AD สามารถทำงานร่วมกับระบบอื่นๆ ได้ เช่น Linux, macOS และแอปพลิเคชันต่างๆ
ในปัจจุบัน กว่า 90% ขององค์กรทั่วโลกที่ใช้ Windows Server ใช้ Active Directory เป็นแกนหลักในการจัดการระบบ IT ขององค์กร
AD Components — ส่วนประกอบของ Active Directory
เพื่อเข้าใจ Active Directory อย่างลึกซึ้ง ต้องรู้จักส่วนประกอบสำคัญเหล่านี้:
1. Domain
- Domain คือหน่วยพื้นฐานของ AD เป็นขอบเขตทางตรรกะ (Logical Boundary) ที่รวม Object ต่างๆ เช่น User, Computer, Group ไว้ด้วยกัน
- แต่ละ Domain มีชื่อเฉพาะ เช่น company.local หรือ corp.example.com
- Domain แชร์ Security Policy และ Trust Relationship ร่วมกัน
- User ที่อยู่ใน Domain เดียวกันสามารถ Login ได้จากเครื่องใดก็ได้ภายใน Domain
2. Forest
- Forest คือโครงสร้างระดับสูงสุดของ AD ประกอบด้วย Domain หนึ่งหรือหลาย Domain
- Domain แรกที่สร้างจะเป็น Forest Root Domain
- ทุก Domain ภายใน Forest แชร์ Schema และ Global Catalog ร่วมกัน
- Forest เป็น Security Boundary ที่แท้จริง — Trust ข้าม Forest ต้อง Configure เพิ่มเติม
3. Tree
- Tree คือกลุ่มของ Domain ที่มี Namespace เดียวกัน (Contiguous DNS Name)
- ตัวอย่าง: company.local → sales.company.local → asia.sales.company.local
- Domain ภายใน Tree มี Two-Way Transitive Trust โดยอัตโนมัติ
4. Organizational Unit (OU)
- OU คือ Container ภายใน Domain ใช้จัดกลุ่ม Object เพื่อความเป็นระเบียบ
- สามารถ Apply Group Policy (GPO) ไปยัง OU ได้ เพื่อบังคับใช้ Policy เฉพาะกลุ่ม
- ตัวอย่างการจัด OU: แยกตามแผนก (IT, HR, Finance) หรือตามสาขา (Bangkok, Chiang Mai)
- สามารถ Delegate Admin Permission ให้ผู้ดูแลระดับ OU ได้
5. Site
- Site คือตำแหน่งทาง Physical (สาขา) ที่เชื่อมต่อด้วย Network
- ใช้ควบคุมการ Replicate ข้อมูลระหว่าง Domain Controller ในแต่ละ Site
- ช่วยให้ Client เลือก DC ที่ใกล้ที่สุดสำหรับ Authentication (ลด Latency)
AD DS — Active Directory Domain Services
AD DS คือ Role หลักของ Active Directory ที่ทำหน้าที่เป็น Directory Service ให้กับ Domain AD DS ทำหน้าที่:
- Authentication: ตรวจสอบตัวตนของ User ที่ Login เข้า Domain (ใช้ Kerberos หรือ NTLM)
- Authorization: ควบคุมสิทธิ์การเข้าถึงทรัพยากรต่างๆ (ไฟล์ โฟลเดอร์ Printer แอปพลิเคชัน)
- Directory Lookup: ให้ Client ค้นหาทรัพยากรในเครือข่ายได้ (เช่น ค้นหา Printer ใกล้ที่สุด)
- Policy Enforcement: บังคับใช้ Group Policy ทั่ว Domain
- Replication: Sync ข้อมูล Directory ระหว่าง Domain Controller ทุกเครื่อง
นอกจาก AD DS แล้ว Active Directory ยังมี Service อื่นๆ ได้แก่:
- AD CS (Certificate Services) — ออก Digital Certificate
- AD FS (Federation Services) — Single Sign-On ข้ามองค์กร
- AD LDS (Lightweight Directory Services) — Directory สำหรับแอปพลิเคชัน
- AD RMS (Rights Management Services) — ควบคุมสิทธิ์การใช้เอกสาร
ติดตั้ง Windows Server 2025 + AD DS — ขั้นตอนทั้งหมด
ต่อไปนี้คือขั้นตอนการติดตั้ง Windows Server 2025 และ Promote เป็น Domain Controller พร้อม AD DS
ขั้นตอนที่ 1: เตรียม Windows Server
- ติดตั้ง Windows Server 2025 (Standard หรือ Datacenter Edition)
- เลือก Desktop Experience (มี GUI) หรือ Server Core (Command-line เท่านั้น)
- ตั้งค่า Static IP Address — DC ต้องมี IP คงที่เสมอ
- ตั้ง Computer Name ให้เหมาะสม เช่น
DC01หรือSRV-DC-BKK01 - Update Windows ให้เป็น Patch ล่าสุด
ขั้นตอนที่ 2: ติดตั้ง AD DS Role
- เปิด Server Manager → Add Roles and Features
- เลือก Role-based or feature-based installation
- เลือก Server ปัจจุบัน
- ติ๊กเลือก Active Directory Domain Services
- ระบบจะเสนอ Feature เพิ่มเติม (เช่น Group Policy Management) — กด Add Features
- กด Next จนถึง Install แล้วรอจนเสร็จ
ขั้นตอนที่ 3: Promote to Domain Controller
- หลังติดตั้ง AD DS Role จะมีข้อความ “Promote this server to a domain controller” — กดเลย
- เลือก Add a new forest (สำหรับ Domain ใหม่) ตั้งชื่อ Root Domain เช่น
company.local - กำหนด Forest Functional Level และ Domain Functional Level — เลือก Windows Server 2025
- ติ๊ก Domain Name System (DNS) server — DC ส่วนใหญ่ทำหน้าที่ DNS ด้วย
- ตั้ง DSRM Password (Directory Services Restore Mode) — สำคัญมาก ใช้ตอนกู้คืน AD
- กำหนด NTDS, SYSVOL, Database Path — ค่า Default ก็ได้ หรือแยก Drive สำหรับ Performance
- ตรวจสอบ Summary แล้วกด Install
- Server จะ Restart อัตโนมัติ — เมื่อกลับมาจะเป็น Domain Controller พร้อมใช้งาน
ติดตั้งผ่าน PowerShell
# ติดตั้ง AD DS Role
Install-WindowsFeature AD-Domain-Services -IncludeManagementTools
# Promote to Domain Controller (New Forest)
Install-ADDSForest `
-DomainName "company.local" `
-DomainNetbiosName "COMPANY" `
-ForestMode "WinThreshold" `
-DomainMode "WinThreshold" `
-InstallDns:$true `
-SafeModeAdministratorPassword (ConvertTo-SecureString "P@ssw0rd!2026" -AsPlainText -Force) `
-Force:$true
Domain Controller (DC) — เซิร์ฟเวอร์หัวใจของ AD
Domain Controller คือ Server ที่รัน AD DS และเก็บฐานข้อมูล Active Directory (NTDS.DIT) ทำหน้าที่ตรวจสอบ Authentication ทุกครั้งที่ User Login
ประเภทของ Domain Controller
- Primary DC: DC เครื่องแรกที่สร้าง Domain (ถือ FSMO Roles ทั้งหมด)
- Additional DC: DC เครื่องที่ 2, 3, … เป็น Replica ของ Primary DC เพื่อ High Availability และ Load Balancing ถ้า DC เครื่องหนึ่งเสีย เครื่องอื่นรับหน้าที่ต่อได้ทันที
- RODC (Read-Only Domain Controller): DC ที่อ่านได้อย่างเดียว ไม่สามารถแก้ไข AD ได้ เหมาะกับสาขาที่ Physical Security ไม่ดี หรือมี Admin น้อย
Best Practice: ทุก Domain ควรมี DC อย่างน้อย 2 เครื่อง เพื่อ Redundancy ถ้า DC เครื่องเดียวเสีย ทั้ง Domain จะ Login ไม่ได้
User & Group Management — จัดการผู้ใช้และกลุ่ม
การจัดการ User และ Group เป็นงานหลักที่ Admin ทำบน Active Directory
การสร้าง User Account
สามารถสร้างผ่าน Active Directory Users and Computers (ADUC) หรือ PowerShell:
# สร้าง User ใหม่ด้วย PowerShell
New-ADUser -Name "Somchai Jaidee" `
-GivenName "Somchai" `
-Surname "Jaidee" `
-SamAccountName "somchai.j" `
-UserPrincipalName "[email protected]" `
-Path "OU=IT,DC=company,DC=local" `
-AccountPassword (ConvertTo-SecureString "Welcome@2026" -AsPlainText -Force) `
-Enabled $true `
-ChangePasswordAtLogon $true
ประเภทของ Group ใน AD
| ประเภท | วัตถุประสงค์ | ตัวอย่าง |
|---|---|---|
| Security Group | ใช้กำหนดสิทธิ์เข้าถึงทรัพยากร (File, Folder, Printer, App) | IT-Admins, HR-ReadOnly, Finance-FullAccess |
| Distribution Group | ใช้สำหรับ Email Distribution List (ไม่มี Security Permission) | All-Staff, Marketing-Team, Announce |
Group Scope
- Domain Local Group: ใช้กำหนดสิทธิ์ภายใน Domain เดียว สมาชิกมาจาก Domain ใดก็ได้
- Global Group: รวม User จาก Domain เดียว แต่สามารถใช้กำหนดสิทธิ์ข้าม Domain ได้
- Universal Group: รวม User จากทุก Domain ใน Forest ใช้กำหนดสิทธิ์ได้ทั้ง Forest
Best Practice (AGDLP): Account → Global Group → Domain Local Group → Permission
ตัวอย่าง: User somchai.j → Group “IT-Staff” (Global) → Group “FileServer-ReadWrite” (Domain Local) → Permission บน Shared Folder
Group Policy (GPO) — ควบคุมทุกอย่างจากศูนย์กลาง
Group Policy Object (GPO) เป็นเครื่องมือที่ทรงพลังที่สุดอย่างหนึ่งของ Active Directory ช่วยให้ Admin กำหนดนโยบายและ Configuration ต่างๆ แล้วบังคับใช้กับ User/Computer ทั้ง Domain หรือเฉพาะ OU โดยอัตโนมัติ
GPO ทำอะไรได้บ้าง?
- กำหนด Password Policy (ความยาว ความซับซ้อน อายุ Password)
- ติดตั้ง Software อัตโนมัติ (Software Deployment)
- จำกัดการใช้งาน Desktop (ปิด Control Panel, ปิด USB, ปิด Command Prompt)
- กำหนด Firewall Rule
- Map Network Drive อัตโนมัติ
- ติดตั้ง Printer อัตโนมัติ
- กำหนด Audit Policy (Log การ Login, Access File)
- และอีกหลายพัน Setting
ตัวอย่าง GPO ที่ใช้บ่อย
1. Password Policy
เปิด Group Policy Management → Edit Default Domain Policy → Computer Configuration → Policies → Windows Settings → Security Settings → Account Policies → Password Policy
- Minimum password length: 12 characters
- Password must meet complexity requirements: Enabled
- Maximum password age: 90 days
- Enforce password history: 24 passwords remembered
- Account lockout threshold: 5 invalid attempts
2. Software Deployment (ติดตั้งซอฟต์แวร์อัตโนมัติ)
สามารถ Deploy MSI Package ไปยังเครื่อง User ทั้งหมดผ่าน GPO:
- วาง MSI File บน Shared Folder ที่ทุก Computer เข้าถึงได้
- สร้าง GPO ใหม่ → Computer Configuration → Policies → Software Settings → Software Installation
- Add Package → เลือก MSI File จาก UNC Path
- เลือก Assigned (ติดตั้งอัตโนมัติ) หรือ Published (User เลือกติดตั้งเอง)
- Link GPO ไปยัง OU ที่ต้องการ
3. Desktop Restriction (จำกัดการใช้งาน Desktop)
- ปิด Access Control Panel: User Configuration → Administrative Templates → Control Panel → Prohibit access to Control Panel → Enabled
- ปิด USB Storage: Computer Configuration → Administrative Templates → System → Removable Storage Access → All Removable Storage classes: Deny all access → Enabled
- ปิด Command Prompt: User Configuration → Administrative Templates → System → Prevent access to the command prompt → Enabled
DNS Integration — AD-Integrated DNS Zone
Active Directory ต้องพึ่งพา DNS อย่างมาก เพราะ Client ใช้ DNS ในการค้นหา Domain Controller (ผ่าน SRV Record) การติดตั้ง DNS Server ร่วมกับ DC เป็น Best Practice ที่แนะนำ
AD-Integrated DNS Zone คืออะไร?
- DNS Zone ที่เก็บข้อมูลไว้ใน Active Directory แทนที่จะเป็นไฟล์ Text
- Secure Dynamic Updates: เฉพาะ Computer ที่เป็นสมาชิก Domain เท่านั้นที่สามารถอัพเดท DNS Record ได้
- Multi-Master Replication: ทุก DC ที่เป็น DNS Server สามารถรับ Update ได้ ไม่ต้องพึ่ง Primary DNS Server เครื่องเดียว
- Automatic Replication: DNS Zone จะ Replicate พร้อมกับ AD Replication โดยอัตโนมัติ
DNS Record ที่สำคัญสำหรับ AD
- A Record: แปลงชื่อ Computer เป็น IP Address
- SRV Record: ระบุว่า Service ใดอยู่ที่ Server ไหน (เช่น _ldap._tcp.company.local → DC01)
- CNAME Record: Alias ชื่ออื่นของ Server
- PTR Record: Reverse Lookup (IP → ชื่อ) สำหรับ Reverse DNS Zone
DHCP Server Configuration
DHCP (Dynamic Host Configuration Protocol) Server ทำหน้าที่แจก IP Address อัตโนมัติให้กับ Client ในเครือข่าย มักติดตั้งร่วมกับ Domain Controller หรือบน Member Server
ขั้นตอนการติดตั้งและ Configure DHCP
- ติดตั้ง DHCP Server Role ผ่าน Server Manager
- Authorize DHCP Server ใน Active Directory (เฉพาะ DHCP ที่ Authorized เท่านั้นที่แจก IP ได้)
- สร้าง Scope — กำหนดช่วง IP ที่จะแจก เช่น 192.168.1.100 — 192.168.1.200
- กำหนด Exclusion Range — IP ที่ไม่ต้องการแจก (เช่น IP ของ Server, Printer)
- ตั้งค่า Scope Options:
- 003 Router (Default Gateway): เช่น 192.168.1.1
- 006 DNS Servers: เช่น 192.168.1.10 (IP ของ DC)
- 015 DNS Domain Name: company.local
- 044 WINS/NBNS Servers (ถ้ามี)
# ติดตั้ง DHCP ด้วย PowerShell
Install-WindowsFeature DHCP -IncludeManagementTools
# Authorize DHCP Server
Add-DhcpServerInDC -DnsName "DC01.company.local" -IPAddress 192.168.1.10
# สร้าง Scope
Add-DhcpServerv4Scope -Name "LAN-Main" `
-StartRange 192.168.1.100 `
-EndRange 192.168.1.200 `
-SubnetMask 255.255.255.0 `
-State Active
# ตั้ง Default Gateway
Set-DhcpServerv4OptionValue -ScopeId 192.168.1.0 -Router 192.168.1.1
# ตั้ง DNS Server
Set-DhcpServerv4OptionValue -ScopeId 192.168.1.0 -DnsServer 192.168.1.10 -DnsDomain "company.local"
DHCP Failover
เพื่อ High Availability ควรตั้ง DHCP Failover ระหว่าง 2 DHCP Server โดยรองรับ 2 Mode:
- Hot Standby: Server หลักแจก IP ทั้งหมด ถ้าเสีย Server สำรองรับช่วง
- Load Balance: ทั้ง 2 Server แจก IP แบ่งกัน (เช่น 50/50)
File Server & Permission (NTFS + Share Permission)
File Server เป็นบทบาทพื้นฐานที่ใช้ร่วมกับ Active Directory ในการแชร์ไฟล์ภายในองค์กร โดยสิทธิ์การเข้าถึงมี 2 ชั้น:
NTFS Permission
- สิทธิ์ระดับ File System ที่ใช้กับ NTFS Partition
- มีผลทั้งเมื่อเข้าถึง Local และผ่าน Network
- ระดับสิทธิ์: Full Control, Modify, Read & Execute, List Folder Contents, Read, Write
- สามารถ Inherit สิทธิ์จาก Parent Folder หรือกำหนดเฉพาะได้
Share Permission
- สิทธิ์ที่ใช้เฉพาะเมื่อเข้าถึงผ่าน Network (SMB/CIFS)
- ระดับสิทธิ์: Full Control, Change, Read
- Best Practice: ตั้ง Share Permission เป็น Everyone: Full Control แล้วควบคุมด้วย NTFS Permission แทน (เพราะละเอียดกว่า)
ตัวอย่างการกำหนดสิทธิ์
| Folder | Share Permission | NTFS Permission |
|---|---|---|
| \\SRV-FILE\Share | Everyone: Full Control | Domain Users: Read |
| \\SRV-FILE\Share\IT | (Inherit) | IT-Staff: Modify |
| \\SRV-FILE\Share\HR | (Inherit) | HR-Staff: Modify, IT-Admins: Full Control |
| \\SRV-FILE\Share\Finance | (Inherit) | Finance-Staff: Modify, IT-Admins: Full Control |
AD Certificate Services (AD CS) — PKI สำหรับองค์กร
Active Directory Certificate Services (AD CS) ให้บริการ Public Key Infrastructure (PKI) ภายในองค์กร ออก Digital Certificate สำหรับ:
- SSL/TLS Certificate: สำหรับ Web Server ภายใน (IIS, Exchange)
- User Certificate: สำหรับ Smart Card Login, Email Signing/Encryption (S/MIME)
- Computer Certificate: สำหรับ 802.1x Authentication, IPSec VPN
- Code Signing Certificate: สำหรับ Sign Script หรือ Application ภายใน
ส่วนประกอบของ AD CS
- Root CA (Certification Authority): CA ระดับสูงสุด ควรเป็น Offline Root CA เพื่อความปลอดภัย
- Subordinate CA (Issuing CA): CA ที่ออก Certificate ให้ User/Computer จริงๆ
- Certificate Templates: Template สำหรับ Certificate แต่ละประเภท กำหนด Key Size, Validity, Usage
- CRL (Certificate Revocation List): รายการ Certificate ที่ถูกเพิกถอน
- OCSP (Online Certificate Status Protocol): ตรวจสอบสถานะ Certificate แบบ Real-time
อ่านเพิ่มเติมเกี่ยวกับ Cybersecurity และ PKI ได้ที่ Cybersecurity คืออะไร? คู่มือรักษาความปลอดภัยไซเบอร์
Azure AD / Microsoft Entra ID — Hybrid Identity
ในยุค Cloud องค์กรจำนวนมากใช้ Microsoft 365 และ Azure ร่วมกับ On-Premises AD ทำให้ต้องมีการเชื่อมต่อ Identity ระหว่าง 2 ระบบ
Azure AD (ปัจจุบันเปลี่ยนชื่อเป็น Microsoft Entra ID)
- เป็น Cloud-based Identity Service ของ Microsoft
- ใช้สำหรับ Authentication กับ Microsoft 365, Azure, SaaS App ต่างๆ
- รองรับ Modern Authentication (OAuth 2.0, OpenID Connect, SAML)
- มี Conditional Access, MFA (Multi-Factor Authentication) ในตัว
Hybrid Identity — เชื่อม On-Premises AD กับ Entra ID
เพื่อให้ User ใช้ Username/Password ชุดเดียวกัน Login ได้ทั้ง On-Premises และ Cloud ต้องใช้ Microsoft Entra Connect (เดิมคือ Azure AD Connect):
- Password Hash Synchronization (PHS): Sync Hash ของ Password ไปยัง Entra ID — ง่ายที่สุด แนะนำเป็น Default
- Pass-through Authentication (PTA): Entra ID ส่ง Authentication Request กลับมาให้ On-Premises AD ตรวจสอบ — Password ไม่เคยออกจาก On-Premises
- Federation (AD FS): ใช้ AD FS Server เป็นตัวกลาง Authentication — ซับซ้อนที่สุด เหมาะกับองค์กรที่มีข้อกำหนดพิเศษ
ขั้นตอนการติดตั้ง Entra Connect
- ดาวน์โหลด Microsoft Entra Connect จาก Microsoft Portal
- ติดตั้งบน Member Server (ไม่ควรติดตั้งบน DC)
- เลือก Sign-in Method (PHS แนะนำ)
- เชื่อมต่อ Entra ID Tenant (ใช้ Global Admin Account)
- เชื่อมต่อ On-Premises AD (ใช้ Enterprise Admin Account)
- เลือก OU ที่ต้องการ Sync
- เปิดใช้ Password Hash Sync + Seamless SSO
- ทดสอบ Login Microsoft 365 ด้วย On-Premises Credentials
อ่านเพิ่มเติมเกี่ยวกับ VPN สำหรับ Remote Access ได้ที่ VPN คืออะไร? คู่มือ VPN สำหรับองค์กร
ข้อผิดพลาดที่พบบ่อยในการใช้ Active Directory
- DC เครื่องเดียว: ถ้าเสีย ทั้ง Domain จะ Login ไม่ได้ ควรมี DC อย่างน้อย 2 เครื่องเสมอ
- ไม่ Backup AD (System State): เมื่อ DC เสียทั้งหมด ไม่สามารถกู้คืน Domain ได้ ต้อง Backup System State ของ DC เป็นประจำ
- ใช้ Domain Admin ทำงานทุกอย่าง: ผิดหลัก Least Privilege ควรใช้ Account ธรรมดาสำหรับงานประจำ และใช้ Admin Account เฉพาะเมื่อจำเป็น
- ไม่จัด OU ให้ดี: ทำให้ Apply GPO ยาก และจัดการ User/Computer ลำบาก ควรวางแผนโครงสร้าง OU ก่อนเริ่มใช้งาน
- GPO ซ้อนกันหลายชั้น: ทำให้ยากต่อการ Debug ว่า Policy ไหนมีผล ใช้
gpresult /Rหรือ Resultant Set of Policy (RSoP) ตรวจสอบ - DNS ไม่ถูกต้อง: AD พึ่ง DNS มาก ถ้า DNS มีปัญหา AD ทั้ง Domain จะมีปัญหาตาม ตรวจสอบด้วย
dcdiag /test:dns - ไม่ Monitor AD Replication: ถ้า Replication ล้มเหลว DC แต่ละเครื่องจะมีข้อมูลไม่ตรงกัน ใช้
repadmin /replsummaryตรวจสอบ - ไม่เปิด Audit Policy: ไม่รู้ว่าใคร Login ล้มเหลว ใครเปลี่ยน Password ใครเข้าถึงไฟล์สำคัญ
คำถามที่พบบ่อย (FAQ)
Q: Active Directory กับ Azure AD (Entra ID) ต่างกันอย่างไร?
A: Active Directory (AD DS) คือ On-Premises Directory Service ที่ติดตั้งบน Windows Server ใช้ LDAP/Kerberos ส่วน Azure AD (Entra ID) คือ Cloud-based Identity Service ใช้ OAuth/OIDC/SAML ทั้งสองทำหน้าที่คล้ายกันคือจัดการ Identity แต่สำหรับสภาพแวดล้อมที่ต่างกัน องค์กรส่วนใหญ่ใช้ทั้งสองร่วมกัน (Hybrid Identity)
Q: ต้องใช้ Windows Server Edition ไหนถึงจะมี AD DS?
A: AD DS มีให้ใน Windows Server Standard และ Datacenter Edition ทุกรุ่นตั้งแต่ 2008 ขึ้นไป ไม่สามารถติดตั้ง AD DS บน Windows 10/11 (Client OS) ได้ สำหรับ Lab/ทดสอบ สามารถใช้ Windows Server Evaluation (ฟรี 180 วัน) ได้
Q: Domain Name ควรใช้ .local หรือ .com?
A: ในอดีตนิยมใช้ .local แต่ปัจจุบัน Microsoft แนะนำให้ใช้ Subdomain ของ Domain จริงที่องค์กรเป็นเจ้าของ เช่น ถ้า Domain จริงคือ company.com ควรใช้ corp.company.com หรือ ad.company.com เพื่อหลีกเลี่ยงปัญหา DNS Conflict และรองรับ Hybrid Identity กับ Entra ID ได้ดี
Q: Group Policy ใช้เวลานานแค่ไหนกว่าจะมีผล?
A: GPO จะ Refresh ทุก 90 นาที (บวก Random Offset 0-30 นาที) สำหรับ Computer/User Policy และทุก 5 นาทีสำหรับ DC ถ้าต้องการให้มีผลทันที ใช้คำสั่ง gpupdate /force บนเครื่อง Client
Q: สามารถ Join Linux เข้า AD Domain ได้ไหม?
A: ได้ โดยใช้เครื่องมืออย่าง SSSD (System Security Services Daemon) + realmd บน Linux ทำให้ User สามารถใช้ AD Credentials Login เข้า Linux Server ได้ และสามารถ Apply บางส่วนของ Policy ผ่าน SSSD
เครื่องมือที่มีประโยชน์สำหรับ AD Admin
- Active Directory Users and Computers (ADUC): GUI หลักสำหรับจัดการ User, Group, Computer, OU
- Active Directory Sites and Services: จัดการ Site, Subnet, Replication
- Group Policy Management Console (GPMC): สร้าง แก้ไข Link GPO
- DNS Manager: จัดการ DNS Zone และ Record
- DHCP Console: จัดการ DHCP Scope และ Lease
- PowerShell AD Module: คำสั่ง Get-ADUser, Get-ADGroup, Get-ADComputer ฯลฯ
- dcdiag: ตรวจสอบสุขภาพ Domain Controller
- repadmin: ตรวจสอบ AD Replication
- gpresult: ดูว่า GPO ใดมีผลกับ User/Computer
อ่านเพิ่มเติมเกี่ยวกับ Server ได้ที่ Server & Datacenter คืออะไร? คู่มือเลือก Server สำหรับองค์กร
อ่านเพิ่มเติมเกี่ยวกับ Network Troubleshooting ได้ที่ Network Troubleshooting คู่มือแก้ปัญหาเครือข่าย