วิธีใช้ AD CS บน Windows Server 2025 แบบละเอียด

หลังติดตั้ง Active Directory Certificate Services หรือ AD CS แล้ว ขั้นตอนสำคัญต่อมาคือ “การใช้งานจริง” เพราะหลายองค์กรติดตั้ง CA สำเร็จ แต่ไม่รู้ว่าจะนำไปใช้อย่างไร

จริงๆ แล้ว AD CS สามารถใช้กับ:

  • HTTPS ภายในองค์กร
  • VPN
  • Wi-Fi Enterprise
  • RDP
  • File Encryption
  • User Authentication
  • Device Authentication

ทั้งหมดนี้ทำผ่านระบบ Certificate ได้จากศูนย์กลางบน Windows Server 2025

องค์กรสมัยใหม่จำนวนมากเริ่มใช้ Certificate แทน Password อย่างเดียว เพราะปลอดภัยกว่า และรองรับแนวคิด Zero Trust ซึ่งทีม comsiam ก็ใช้ AD CS ในระบบองค์กรจริงเช่นกัน

บทความนี้จะสอนการใช้งาน AD CS แบบละเอียด พร้อมแนวทางใช้งานจริงในองค์กร


① AD CS ทำงานอย่างไร

AD CS จะ:

  • ออก Certificate
  • ตรวจสอบ Certificate
  • สร้าง Trust ภายในองค์กร

ผ่าน CA Server


② Certificate ใช้ทำอะไรได้บ้าง

ตัวอย่าง:

  • HTTPS
  • VPN
  • Wi-Fi 802.1X
  • Smart Card
  • Auto Enrollment

③ วิธีเปิด Certification Authority Console

เปิด:

certsrv.msc

④ ส่วนสำคัญใน CA Console

จะมี:

  • Issued Certificates
  • Pending Requests
  • Revoked Certificates
  • Certificate Templates

⑤ Certificate Template คืออะไร

Template คือ:
รูปแบบของ Certificate

เช่น:

  • Web Server
  • User
  • Computer
  • VPN

⑥ วิธีเปิด Certificate Templates

ใช้:

certtmpl.msc

⑦ วิธี Duplicate Template

คลิกขวา Template

เลือก:

Duplicate Template

นิยมทำก่อนใช้งานจริง


⑧ วิธีสร้าง Web Server Certificate Template

เลือก Template:

Web Server

Duplicate แล้วตั้งชื่อ เช่น:

Internal-Web

⑨ วิธี Publish Template ไปยัง CA

ใน CA Console

คลิกขวา:

Certificate Templates
> New
> Certificate Template to Issue

เลือก Template ที่สร้าง


⑩ วิธี Request Certificate ผ่าน MMC

เปิด:

mmc

Add Snap-in:

Certificates

⑪ วิธี Request Certificate ใหม่

ไปที่:

Personal
> Certificates

คลิกขวา:

Request New Certificate

⑫ วิธีใช้ Web Enrollment

เปิด Browser:

http://servername/certsrv

สามารถ:

  • Request
  • Download
  • Renew Certificate

ผ่าน Web ได้


⑬ วิธีใช้ Auto Enrollment

ใช้ GPO:

Computer Configuration
> Policies
> Windows Settings
> Security Settings
> Public Key Policies

เปิด:

Certificate Services Client - Auto Enrollment

เลือก:

Enabled

⑭ วิธี Force Certificate Enrollment

ที่ Client ใช้:

gpupdate /force

และ:

certutil -pulse

⑮ วิธีตรวจสอบ Certificate ที่ได้รับ

เปิด:

certmgr.msc

ดูใน:

Personal
> Certificates

⑯ วิธีใช้ Certificate กับ IIS HTTPS

เปิด Internet Information Services

ไปที่:

Bindings

เลือก:

HTTPS

จากนั้นเลือก Certificate


⑰ วิธีใช้ Certificate กับ VPN

นิยมใช้กับ:

  • SSTP VPN
  • Always On VPN
  • Wi-Fi Authentication

ช่วยเพิ่ม Security มาก


⑱ วิธีใช้ Certificate กับ Wi-Fi Enterprise

ใช้ร่วมกับ:

  • NPS
  • 802.1X
  • RADIUS

ช่วยให้:
Wi-Fi ปลอดภัยกว่า Password


⑲ วิธี Revoke Certificate

ใน CA Console

คลิกขวา Certificate

เลือก:

All Tasks
> Revoke Certificate

⑳ CRL คืออะไร

CRL ย่อมาจาก:

Certificate Revocation List

คือรายการ Certificate ที่ถูกยกเลิก


㉑ วิธี Publish CRL

คลิกขวา:

Revoked Certificates

เลือก:

Publish

㉒ วิธี Backup AD CS

สำคัญมาก

Backup:

  • CA Database
  • Private Key
  • Certificate

ใช้:

certutil -backup

㉓ วิธี Restore AD CS

ใช้:

certutil -restore

㉔ ปัญหาที่พบบ่อย

Auto Enrollment ไม่ทำงาน

สาเหตุ:
GPO ไม่ Apply


Certificate ไม่ Trust

สาเหตุ:
Root CA ไม่อยู่ Trusted Store


HTTPS ยังแดง

สาเหตุ:
ชื่อไม่ตรง CN/SAN


㉕ แนวทาง AD CS ที่ดีสำหรับองค์กร

แนะนำ:

  • ใช้ Auto Enrollment
  • Backup CA
  • ใช้ SHA256+
  • แยก Root CA

หลายองค์กรใช้ Self-signed Certificate กระจัดกระจายจนบริหารยาก ซึ่งทีม comsiam มักแนะนำให้รวมทั้งหมดผ่าน AD CS


㉖ สิ่งที่ไม่ควรทำ

ไม่ควร:

  • ใช้ SHA1
  • ไม่ Backup CA
  • ใช้ Certificate หมดอายุ
  • เปิด Enrollment ทุกคน

㉗ AD CS กับ Let’s Encrypt ต่างกันยังไง

AD CS

ใช้ภายในองค์กร


Let’s Encrypt

ใช้ Public Website

หลายองค์กรใช้ทั้งคู่ร่วมกัน


㉘ สรุป

Active Directory Certificate Services บน Windows Server 2025 คือระบบสำคัญสำหรับจัดการ Certificate ภายในองค์กร

ข้อดี:

  • เพิ่ม Security
  • รองรับ HTTPS
  • รองรับ VPN/Wi-Fi
  • ใช้ Auto Enrollment ได้

โดยเฉพาะองค์กรที่ต้องการ Security สูง AD CS ถือเป็นพื้นฐานสำคัญของระบบ Enterprise และ Zero Trust ยุคใหม่