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

แก้ไข "The user's account has expired" ใน Windows 11/10

บางครั้งต้องสร้าง Temporary Account ใน Windows 11/10 คล้าย Guest Account แต่มีวันหมดอายุ เมื่อหมดอายุใช้ไม่ได้ ต่างจาก Password Expiration ที่แค่บังคับเปลี่ยนรหัสผ่าน แล้วใช้ต่อได้ บทความนี้แก้ปัญหา The user's account has expired

แก้ไข  The user s account has expired  ใน Windows 11/10

The user's account has expired on Windows 11/10

แก้ได้ด้วยคำสั่ง Net User ตั้งวันหมดอายุ หรือปิดการหมดอายุ:

  1. ปิด User Account Expiration ด้วย PowerShell
  2. ปิด User Account Expiration ใน Active Directory

1. ปิด User Account Expiration ด้วย PowerShell

แก้ไข  The user s account has expired  ใน Windows 11/10

  1. เปิด PowerShell Admin: Win+X → Windows PowerShell (Admin)
  2. หา Username ที่แน่นอน: พิมพ์ net user → Copy ชื่อ
  3. รันคำสั่ง:
    net user USERNAME /expires:never
    แทน USERNAME ด้วยชื่อจริง

2. ปิด User Account Expiration ใน Active Directory

หากต้องการ Temporary Account แต่ไม่อยากหมดอายุ ตั้งตั้งแต่แรก ผ่าน Administrative Tools

แก้ไข  The user s account has expired  ใน Windows 11/10

  1. ค้น Administrative Tools ใน Start → เปิดด้วย Admin
  2. เลือก Active Directory Users and Computers
  3. ซ้ายขยาย Domain → เลือก Users
  4. คลิกขวา User Account ที่ต้องการ → Properties
  5. แท็บ Account → ถูก Account Expires = Never
  6. ตั้ง Password never expires ในส่วนเดียวกันได้

ใน Windows 11/10 Pro/Home ไม่มี Temporary Account ใช้ Guest Account แทนได้

แก้ไข  The user s account has expired  ใน Windows 11/10