How to delete a disk partition

How to delete a disk partition

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29

PS C:\Windows\system32> get-disk

Number Friendly Name Serial Number HealthStatus OperationalStatus Total Size Partition
Style
------ ------------- ------------- ------------ ----------------- ---------- ----------
1 SAMSUNG MZ... 0025_388B_91BA_DA7C. Healthy Online 476.94 GB GPT
0 WDC WD5000... WD-WXM1E156C3HT Healthy Online 465.76 GB GPT
3 Generic ST... Healthy No Media 0 B RAW
2 SanDisk Sa... AE2B070330C0 Healthy Online 466.27 GB GPT


PS C:\Windows\system32> Get-Partition -DiskNumber 2


DiskPath:
\\?\usbstor#disk&ven_sandisk&prod_sandisk_3.2_gen1&rev_dl17#a2003c8d910ceb73&0#{53f56307-b6bf-11d0-94f2-00a0c91efb8b}

PartitionNumber DriveLetter Offset Size Type
--------------- ----------- ------ ---- ----
1 1048576 512 MB System


PS C:\Windows\system32> Remove-Partition -DiskNumber 2 -PartitionNumber 1

Confirm
Are you sure you want to perform this action?
This will erase all data on disk 2 partition 1.
[Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "Y"):