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

หลังสร้าง Group Policy หรือ GPO แล้ว ขั้นตอนสำคัญต่อมาคือ “การใช้งาน GPO ให้ถูกต้อง” เพราะหลายองค์กรสร้าง GPO เป็น แต่ใช้งานจริงไม่เป็น ทำให้:

  • Policy ไม่ทำงาน
  • User ไม่ได้รับค่า
  • เครื่องบางเครื่องไม่ Apply
  • ระบบเริ่มมั่ว

GPO หรือ Group Policy ถือเป็นหัวใจสำคัญของ Active Directory เพราะช่วยควบคุม User และ Computer ทั้งองค์กรจากส่วนกลางได้อย่างทรงพลัง

บทความนี้จะสอนวิธีใช้งาน GPO บน Windows Server 2025 แบบละเอียด พร้อมแนวทางใช้งานจริงในองค์กร ซึ่งเป็นแนวทางที่ทีม comsiam ใช้ในระบบองค์กรจริง


① GPO ทำงานอย่างไร

GPO จะถูก Apply ผ่าน:

  • Domain
  • OU
  • Site

เมื่อ:

  • User Login
  • เครื่อง Boot
  • หรือ Refresh Policy

② Computer Policy กับ User Policy ต่างกันยังไง

Computer Policy

Apply ตอนเครื่องเปิด

ใช้ควบคุม:

  • Firewall
  • USB
  • Windows Update

User Policy

Apply ตอน User Login

ใช้ควบคุม:

  • Wallpaper
  • Desktop
  • Control Panel

③ วิธีเปิด Group Policy Management

เปิด:

Server Manager
> Tools
> Group Policy Management

หรือใช้:

gpmc.msc

④ วิธีสร้าง GPO ใหม่

คลิกขวา OU

เลือก:

Create a GPO in this domain, and Link it here

ตั้งชื่อ GPO เช่น:

Office Security

⑤ วิธี Edit GPO

คลิกขวา GPO

เลือก:

Edit

จะเข้าสู่:

Group Policy Management Editor

⑥ โครงสร้างสำคัญของ GPO

จะมี 2 ส่วนหลัก:

Computer Configuration
User Configuration

⑦ วิธีใช้ GPO ปิด Control Panel

ไปที่:

User Configuration
> Policies
> Administrative Templates
> Control Panel

เปิด:

Prohibit access to Control Panel

เลือก:

Enabled

⑧ วิธีใช้ GPO เปลี่ยน Wallpaper

ไปที่:

User Configuration
> Policies
> Administrative Templates
> Desktop

เลือก:

Desktop Wallpaper

ใส่ Path รูปภาพ


⑨ วิธีใช้ GPO ปิด CMD

ไปที่:

User Configuration
> Administrative Templates
> System

เลือก:

Prevent access to the command prompt

⑩ วิธีใช้ GPO ปิด USB

ไปที่:

Computer Configuration
> Administrative Templates
> System
> Removable Storage Access

ตั้งค่า:

Deny all access

⑪ วิธีใช้ GPO บังคับ Password Policy

ไปที่:

Computer Configuration
> Windows Settings
> Security Settings
> Account Policies

ตั้งค่า:

  • Minimum Length
  • Complexity
  • Expiration

⑫ วิธีใช้ GPO Map Drive

ไปที่:

User Configuration
> Preferences
> Windows Settings
> Drive Maps

สามารถ:

  • Map NAS
  • Map Shared Folder

อัตโนมัติได้


⑬ วิธีใช้ GPO Deploy Printer

ไปที่:

User Configuration
> Preferences
> Control Panel Settings
> Printers

ช่วยติดตั้ง Printer อัตโนมัติ


⑭ วิธีใช้ GPO Deploy Software

ไปที่:

Computer Configuration
> Policies
> Software Settings

สามารถ Deploy:

  • MSI Package
  • Program ภายในองค์กร

⑮ วิธี Force GPO ทันที

ที่ Client ใช้:

gpupdate /force

ช่วยให้ Policy ทำงานทันที


⑯ วิธี Restart หลังใช้ GPO

บาง GPO:
ต้อง Restart หรือ Logout ก่อน

โดยเฉพาะ:

  • Computer Policy
  • Security Policy

⑰ วิธีตรวจสอบว่า GPO Apply หรือไม่

ใช้:

gpresult /r

จะแสดง:

  • GPO ที่ Apply
  • Policy ทั้งหมด

⑱ วิธีดู Resultant Set of Policy

ใช้:

rsop.msc

ช่วยวิเคราะห์:
GPO ไหนทำงานจริง


⑲ วิธีแก้ GPO ไม่ทำงาน

ตรวจสอบ:

  • Client Join Domain หรือไม่
  • DNS ถูกหรือไม่
  • OU ถูกหรือไม่
  • Security Filtering ถูกหรือไม่

กว่า 70% ของปัญหา GPO มาจาก DNS


⑳ วิธีดู Event GPO

เปิด:

Event Viewer
> Applications and Services Logs
> Microsoft
> Windows
> GroupPolicy

㉑ วิธีใช้ Security Filtering

ใช้จำกัดว่า:
ใคร Apply GPO ได้

ตัวอย่าง:

  • เฉพาะ IT
  • เฉพาะ HR

㉒ วิธีใช้ WMI Filtering

ใช้ Apply GPO ตามเงื่อนไข เช่น:

  • Windows 11 เท่านั้น
  • Notebook เท่านั้น

เหมาะสำหรับองค์กรใหญ่


㉓ แนวทางใช้ GPO ที่ดี

แนะนำ:

  • แยก GPO ตามหน้าที่
  • ตั้งชื่อชัดเจน
  • Backup GPO
  • ทดสอบก่อนใช้จริง

หลายองค์กรใช้ GPO รวมทุกอย่างไว้ตัวเดียวจนแก้ยาก ซึ่งทีม comsiam มักแนะนำให้แยกเป็นระบบ


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

ไม่ควร:

  • แก้ Default Domain Policy มั่ว
  • ใช้ GPO ใหญ่มาก
  • Link GPO ทุกอย่างกับ Domain Root
  • ไม่มี Testing OU

㉕ คำสั่งสำคัญเกี่ยวกับ GPO

gpupdate /force
gpresult /r
rsop.msc

ควรใช้คล่องทุกคำสั่ง


㉖ สรุป

การใช้งาน GPO บน Windows Server 2025 เป็นเครื่องมือสำคัญที่ช่วยควบคุม User และ Computer ทั้งองค์กรผ่าน Active Directory ได้จากศูนย์กลาง

หากใช้อย่างถูกต้อง:

  • ลดงาน IT
  • เพิ่ม Security
  • ควบคุมเครื่องได้ง่าย
  • ลดปัญหา Human Error

โดยเฉพาะองค์กรที่มีเครื่องจำนวนมาก GPO ถือเป็นหัวใจสำคัญของระบบ Windows Enterprise