Computer >> บทช่วยสอนคอมพิวเตอร์ >  >> ระบบ >> Windows 11

ตั้งค่า Disk Quota จำกัดพื้นที่ผู้ใช้ใน Windows 11

แชร์คอมพิวเตอร์งาน/บ้านกับคนอื่น? แอปและไฟล์จาก Guest Accounts กินพื้นที่ดิสก์เยอะเกินไป? Windows มี Quota System ให้ Admin ควบคุม Storage ได้ ใช้ได้กับ Internal และ External Drives

บทความนี้แนะนำขั้นตอนควบคุมข้อมูลที่ User เก็บได้ โดยตั้ง Disk Quota Limit หมายเหตุ: Quota Management ทำงานได้เฉพาะ Drive ที่ Format เป็น NTFS เท่านั้น

ตั้งค่า Disk Quota ผ่าน File Explorer (วิธีง่ายที่สุด)

  1. เปิด File Explorer → เลือก This PC ด้านซ้าย
  2. เลื่อนไป "Devices and drives" → คลิกขวา Drive ที่ต้องการจำกัด → Properties
  3. แท็บ Quota → Show Quota Settings
  4. ติ๊ก Enable quota management
  5. ติ๊ก Deny disk space to users exceeding quota limit (บังคับจำกัด ไม่ให้เขียนข้อมูลเมื่อเกิน)
  6. เลือก Limit disk space to
  7. ตั้งค่า Limit: เช่น 30 GB → ใส่ 30 ในช่องแรก เลือก GB ใน Dropdown
  8. ตั้ง Warning Level ต่ำกว่า Limit เล็กน้อย (เช่น Limit 30 GB → Warning 25 GB) Windows จะแจ้งเตือนเมื่อใกล้ครบ
  9. ติ๊ก Log Event เมื่อ User เกิน Quota หรือเกิน Warning Level (บันทึกใน Event Viewer)
  10. กด Apply
  11. กด OK บน Warning Prompt เพื่อเปิดใช้งาน Quota
  12. กด OK ใน Quota Settings Window

หมายเหตุ: อาจต้อง Restart คอมพิวเตอร์ Quota เป็น Drive-Specific — ถ้ามี Partition หลาย Partition (แยกจาก C:) Quota บน C: ไม่ครอบคลุม Partition อื่น

ดูและปรับ Disk Quota Limit ต่อ User

Quota Limit ที่ตั้งจะครอบคลุมทุก User บนเครื่อง มี Tool Quota Entries ใน Quota Settings Window ปรับ/ปิด Quota ได้ต่อ User เช็คพื้นที่ที่ใช้ vs Quota ได้

  1. เปิด Quota Settings → กด Quota Entries
  2. คอลัมน์ "Amount Used" และ "Quota Limit" แสดงการใช้งาน vs ขีดจำกัด
  3. ถ้าไม่เจอ User ในรายการ → เพิ่มเอง: Quota Menu → New Quota Entry → Advanced → Find Now → Double-click User → OK
  4. ตั้ง Quota Limit และ Warning Level ให้ User นั้น → OK
  5. ปรับ/ปิด Quota ของ User: คลิกขวา User → Properties → ปรับ Limit/Warning → Apply → OK
  6. ยกเลิก Quota: เลือก "Do not limit disk usage" → Apply → OK หรือ คลิกขวา User → Delete

Delete User จาก Quota Entries: Next Page → Take Ownership (เก็บไฟล์ในพื้นที่ที่จัดสรร) หรือ Delete (ไม่ต้องการไฟล์)

ตั้ง Disk Quota ผ่าน Group Policy Editor (สำหรับ Pro/Education/Enterprise)

ถ้า File Explorer ไม่บังคับ Quota ได้ ให้แก้ใน Group Policy Editor (Windows 11 Home ไม่มี ให้用 Registry Editor แทน)

  1. Win+R → gpedit → Enter
  2. Sidebar: Computer Configuration → Administrative Templates → System → Disk Quotas
  3. Double-click Enable disk quotas → Enabled → Apply → OK
  4. Double-click Enforce disk quota limit → Enabled → Apply → OK
  5. Double-click Specify default quota limit and warning level → Enabled → ใส่ค่า Limit/Warning/Unit → Apply → OK
  6. ถ้าอยากให้ Policy ครอบคลุม Removable/External Drives: Double-click Apply policy to removable media → Enabled

ตั้ง Disk Quota ผ่าน Registry Editor

บังคับ Quota ผ่าน Registry (Backup Registry ก่อนเสมอ!)

  1. Win+R → regedit → OK
  2. วาง Path: HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\DiskQuota → Enter
  3. ตรวจสอบ Keys Enable และ Enforce ต้องเป็น 1 (Enabled) ทั้งคู่
  4. Double-click Enable/Enforce → Value data = 1 → OK

ทำให้การจัดการ Storage เป็นอัตโนมัติ

ขั้นตอนข้างต้นตั้งระบบ Disk Quota Management ใน Windows 11 ได้ ย้อนรุ่นได้: Windows 10, 8, 7 ใช้วิธีเดียวกัน