Diskpart เป็นเครื่องมือที่มีประสิทธิภาพในการจัดการดิสก์และพาร์ติชันบน Windows การใช้ Diskpart จะช่วยให้คุณสามารถควบคุมและจัดการพื้นที่ในแฟลชไดรฟ์ของคุณได้อย่างละเอียดมากขึ้น
Diskpart : เป็นเครื่องมือฟรีที่มาพร้อมกับระบบปฏิบัติการ Windows หากต้องการใช้งาน Diskpart ให้พิมพ์คำสั่ง diskpart
ที่ Command Prompt ด้วยสิทธิ์ Administrator
คำเตือน : การใช้ Diskpart อาจทำให้เกิดความเสียหายกับข้อมูลได้หากคุณปฏิบัติการผิดพลาด โปรดสำรองข้อมูลสำคัญของคุณก่อนดำเนินการ
ขั้นตอนการใช้ Diskpart :
- เปิด Command Prompt ด้วยสิทธิ์ Administrator :
- คลิกขวาที่ปุ่ม Start แล้วเลือก Windows PowerShell (Admin) หรือ Command Prompt (Admin)
- พิมพ์คำสั่งต่อไปนี้ตามลำดับ (อย่าลืมกด Enter หลังแต่ละคำสั่ง) :
list disk
: แสดงรายการดิสก์ทั้งหมดในระบบของคุณselect disk X
: แทนที่ X ด้วยหมายเลขของดิสก์ที่ต้องการจัดการ (สังเกตจากคำสั่ง list disk ก่อนหน้านี้)clean
: ลบพาร์ติชันทั้งหมดในดิสก์ที่เลือกcreate partition primary
: สร้างพาร์ติชันหลักใหม่select partition 1
: เลือกพาร์ติชันที่เพิ่งสร้างactive
: ทำให้พาร์ติชันนี้เป็นพาร์ติชันที่ใช้งานได้format fs=ntfs quick
: ฟอร์แมตพาร์ติชันเป็น NTFS (คุณสามารถเปลี่ยน fs เป็น fat32 ได้หากต้องการ)exit
: ออกจาก Diskpart
ตัวอย่าง:
list disk
select disk 2
clean
create partition primary
select partition 1
format fs=ntfs quick
exit
คำอธิบายคำสั่ง:
- list disk : แสดงรายการดิสก์ทั้งหมดในระบบ
- select disk X : เลือกดิสก์ที่ต้องการจัดการ
- clean : ลบพาร์ติชันทั้งหมดในดิสก์ที่เลือก (ระวังข้อมูลจะหายไปทั้งหมด)
- create partition primary : สร้างพาร์ติชันหลักใหม่
- select partition 1 : เลือกพาร์ติชันที่เพิ่งสร้าง
- active : ทำให้พาร์ติชันนี้เป็นพาร์ติชันที่ใช้งานได้
- format fs=ntfs quick : ฟอร์แมตพาร์ติชันเป็น NTFS (fs=fat32 สำหรับฟอร์แมตเป็น FAT32)
- exit : ออกจาก Diskpart
หมายเหตุ : active
command ใช้ได้เฉพาะกับ disk ที่ fixed MBR disks เท่านั้น กรณีใช้ GPT จะไม่สามารถใช้คำสั่ง active
ข้อควรระวัง :
- ตรวจสอบหมายเลขดิสก์ : ก่อนใช้คำสั่ง select disk ให้ตรวจสอบให้แน่ใจว่าคุณเลือกดิสก์ที่ถูกต้อง เพราะการเลือกผิดอาจทำให้ข้อมูลในดิสก์อื่นหายไปได้
- สำรองข้อมูล : ก่อนดำเนินการควรสำรองข้อมูลสำคัญออกมาก่อน
- ฟอร์แมต : การฟอร์แมตจะลบข้อมูลทั้งหมดในดิสก์
- ระบบปฏิบัติการ : หากคุณต้องการใช้แฟลชไดรฟ์กับระบบปฏิบัติการอื่นๆ อาจต้องเลือกระบบไฟล์ที่เหมาะสม เช่น FAT32
หลังจากดำเนินการตามขั้นตอนข้างต้นแล้ว พื้นที่ในแฟลชไดรฟ์ของคุณจะถูกฟอร์แมตใหม่ และคุณจะสามารถใช้งานได้ตามปกติ
หากคุณยังไม่มั่นใจในการใช้ Diskpart ขอแนะนำให้ขอความช่วยเหลือจากผู้เชี่ยวชาญ
คำเตือน : การใช้ Diskpart อาจทำให้เกิดความเสียหายกับข้อมูลได้ หากคุณไม่แน่ใจในขั้นตอนการดำเนินการ ควรขอความช่วยเหลือจากผู้เชี่ยวชาญ
Microsoft DiskPart version 10.0.19041.3636
ACTIVE - Mark the selected partition as active.
ADD - Add a mirror to a simple volume.
ASSIGN - Assign a drive letter or mount point to the selected volume.
ATTRIBUTES - Manipulate volume or disk attributes.
ATTACH - Attaches a virtual disk file.
AUTOMOUNT - Enable and disable automatic mounting of basic volumes.
BREAK - Break a mirror set.
CLEAN - Clear the configuration information, or all information, off the
disk.
COMPACT - Attempts to reduce the physical size of the file.
CONVERT - Convert between different disk formats.
CREATE - Create a volume, partition or virtual disk.
DELETE - Delete an object.
DETAIL - Provide details about an object.
DETACH - Detaches a virtual disk file.
EXIT - Exit DiskPart.
EXTEND - Extend a volume.
EXPAND - Expands the maximum size available on a virtual disk.
FILESYSTEMS - Display current and supported file systems on the volume.
FORMAT - Format the volume or partition.
GPT - Assign attributes to the selected GPT partition.
HELP - Display a list of commands.
IMPORT - Import a disk group.
INACTIVE - Mark the selected partition as inactive.
LIST - Display a list of objects.
MERGE - Merges a child disk with its parents.
ONLINE - Online an object that is currently marked as offline.
OFFLINE - Offline an object that is currently marked as online.
RECOVER - Refreshes the state of all disks in the selected pack.
Attempts recovery on disks in the invalid pack, and
resynchronizes mirrored volumes and RAID5 volumes
that have stale plex or parity data.
REM - Does nothing. This is used to comment scripts.
REMOVE - Remove a drive letter or mount point assignment.
REPAIR - Repair a RAID-5 volume with a failed member.
RESCAN - Rescan the computer looking for disks and volumes.
RETAIN - Place a retained partition under a simple volume.
SAN - Display or set the SAN policy for the currently booted OS.
SELECT - Shift the focus to an object.
SETID - Change the partition type.
SHRINK - Reduce the size of the selected volume.
UNIQUEID - Displays or sets the GUID partition table (GPT) identifier or
master boot record (MBR) signature of a disk.