The essentials

Quick reference

One focused task per row. Jump to the related section for complete, working examples.

UseSyntaxExamples
List candidate diskslist diskView examples
Select the approved diskselect disk 3View examples
Inspect target detailsdetail diskView examples
List existing partitionslist partitionView examples
List all volumeslist volumeView examples
Read clean helphelp cleanView examples
Remove partition metadatacleanView examples
Zero every sectorclean allView examples
Read conversion helphelp convertView examples
Convert an empty disk to GPTconvert gptView examples
Convert an empty disk to MBRconvert mbrView examples
Verify partition stylelist diskView examples
Verify the empty layoutlist partitionView examples
Validate MBR2GPT conversionmbr2gpt /validate /disk:3 /allowFullOSView examples
Run MBR2GPT conversionmbr2gpt /convert /disk:3 /allowFullOSView examples
Exit DiskPartexitView examples

DiskPart clean and partition-style conversion belong in rebuild and deployment workflows, not casual troubleshooting. Clean removes partition and volume metadata from the selected disk; clean all writes zeros to every sector and can take a long time. Both destroy access to existing data. Back up, disconnect look-alike devices where practical, identify the target with several independent properties, and prefer MBR2GPT when converting a supported Windows system disk without erasing it.

Step by step

Detailed examples

01

Prove disk identity before wiping

Disk numbers can change across boots and attachment order. Match number with size, model, unique ID, location path, current partitions, and volume labels. Confirm the disk is not boot, system, clustered, shared, encrypted, or hosting application data. A backup is useful only if its restore was tested and its location is not on the target disk.

Destructive-operation preflight
list disk
select disk 3
detail disk
list partition
list volume
rem Stop if any identity, role, size, or layout differs from the approved change.
Back to quick reference ↑
02

Record the current layout and dependencies

Before cleaning, save DiskPart output, encryption status, mount points, partition types, application owners, and recovery instructions. Labels and drive letters are weak identifiers but useful corroboration. Remove the target from clusters, backup jobs, replication, and storage pools according to those products' procedures.

Capture a read-only DiskPart record
diskpart /s C:\Admin\disk-audit.txt > C:\Admin\disk-3-before.log
Get-Content C:\Admin\disk-3-before.log
Back to quick reference ↑
03

Choose clean or clean all deliberately

Clean removes partition and volume formatting metadata from the selected disk, including GPT partitioning information and the protective MBR. Clean all additionally writes zeros to every sector, so runtime scales with disk size. Neither operation has undo. Zero-filling is not a substitute for an SSD vendor sanitize, cryptographic erase, or a regulated media-disposal process.

Approved rebuild sequence
select disk 3
detail disk
rem DANGER: the next command destroys the selected disk's partition layout.
clean
list partition
Back to quick reference ↑
04

Convert only an empty basic disk

DiskPart convert gpt and convert mbr require an empty basic disk. Cleaning first is destructive, so partition-style conversion with DiskPart is a rebuild path. GPT is the normal choice for modern UEFI systems and large disks; MBR is mainly for legacy BIOS compatibility and has partition-count and size limits.

Erase and initialize an approved data disk as GPT
select disk 3
detail disk
clean
convert gpt
list disk
list partition
Back to quick reference ↑
05

Use MBR2GPT for supported in-place system conversion

MBR2GPT is separate from DiskPart and can convert a supported Windows system disk from MBR to GPT without deleting data. Run validation first, protect recovery keys, review logs, and have rollback media. After conversion, firmware must boot in UEFI mode; changing partition style alone does not change firmware settings. MBR2GPT does not convert GPT back to MBR.

Validate before in-place conversion
mbr2gpt /validate /disk:3 /allowFullOS
if ($LASTEXITCODE -ne 0) { throw "MBR2GPT validation failed: $LASTEXITCODE" }
# Run /convert only during the approved change window.
Back to quick reference ↑
06

Verify the style before creating partitions

After clean and conversion, repeat list disk, detail disk, and list partition. Confirm the GPT marker, empty layout, expected disk size, and identifier. Then apply a separately reviewed partition plan for the correct firmware mode. Do not continue automatically after unexpected output.

Post-conversion verification
list disk
select disk 3
detail disk
list partition
exit
Back to quick reference ↑

Sources and further reading

References

Authoritative documentation used to verify and expand this cheat sheet.

  1. Microsoftcleanlearn.microsoft.com
  2. Microsoftconvertlearn.microsoft.com
  3. MicrosoftConvert a disk to GPT or MBRlearn.microsoft.com
  4. MicrosoftMBR2GPTlearn.microsoft.com

Help us improve

Found a typo or missing example?

Tell us what would make this cheat sheet clearer, more complete, or more useful.

Share feedback