{"id":1172,"date":"2017-03-05T02:47:05","date_gmt":"2017-03-04T23:47:05","guid":{"rendered":"https:\/\/computingforgeeks.com\/?p=1172"},"modified":"2024-02-22T10:59:08","modified_gmt":"2024-02-22T07:59:08","slug":"how-to-create-disk-partitions-in-windows-using-diskpart-command","status":"publish","type":"post","link":"https:\/\/computingforgeeks.com\/how-to-create-disk-partitions-in-windows-using-diskpart-command\/","title":{"rendered":"Create disk partitions in Windows using diskpart command"},"content":{"rendered":"\n<p>This tutorial will teach you how to create disk partitions in Windows using diskpart command. Apart from how to create disk partitions in Windows using diskpart, you can also delete partitions using the diskpart command in Windows. Diskpart is the default Windows systems command line disk partitioning utility.<\/p>\n\n\n\n<p>To demonstrate on how to&nbsp;create disk partitions in Windows using diskpart command. I&#8217;m going to add a secondary drive to my Windows server, we&#8217;ll then Create a Partition using diskpart command, Set label for the partition and assign a drive letter to the partition.<\/p>\n\n\n\n<p>Apart from creating Logical volumes and partitions with diskpart command. You can also repair corrupted external HDD and flash Drives.<\/p>\n\n\n\n<p><strong>Warning:<\/strong><\/p>\n\n\n\n<p>Please note that diskpart can be used not only to create a partition but also to delete or format it. Any improper execution of the commands will result in serious data loss which is irreversible. In such scenarios the only way you can get back your data is to make use of a&nbsp;<a href=\"https:\/\/www.remosoftware.com\/partition-recovery-tool\" target=\"_blank\" rel=\"noreferrer noopener\">partition recovery software<\/a>&nbsp;that can help you recover data from formatted partition using disk part. Suppose you want to wipe the PC willingly, you have to follow a&nbsp;slightly different set of commands to&nbsp;<a href=\"https:\/\/www.windowschimp.com\/diskpart-commands\/\" target=\"_blank\" rel=\"noreferrer noopener\">format using diskpart<\/a>.&nbsp;<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-how-to-create-disk-partitions-in-windows-using-diskpart-command\">Creating disk partitions in Windows using diskpart command<\/h2>\n\n\n\n<p>Without further ado, let&#8217;s dive in. Follow steps below to create disk partitions in Windows using diskpart command.<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Launching diskpart utility<\/li>\n<\/ol>\n\n\n\n<p>To run diskpart, press&nbsp;<strong>Windows key + X<\/strong> keyboard shortcut. This will open the Power User menu, then select <strong>Command Prompt (Admin)<\/strong>.<\/p>\n\n\n\n<p>2. Now type&nbsp;<strong>diskpart&nbsp;<\/strong>on the command prompt. If you&#8217;re running Windows server, you can just run&nbsp;<strong>Powershell<\/strong>&nbsp;then launch diskpart on the cli.\n<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">diskpart<\/pre>\n\n\n\n<p>3.&nbsp;List available disk drives using the command below:\n<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">list disk<\/pre>\n\n\n\n<p>4. Now select the drive you want to partition using&nbsp;<em>select disk&nbsp;<\/em>command. On my setup the disk is number 2 with 2GB of space unpartitioned.\n<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">select disk 1\nlist partition<\/pre>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/computingforgeeks.com\/wp-content\/uploads\/2017\/03\/list-disk.png\"><img loading=\"lazy\" decoding=\"async\" width=\"721\" height=\"385\" src=\"https:\/\/computingforgeeks.com\/wp-content\/uploads\/2017\/03\/list-disk.png\" alt=\"How to create disk partitions in windows using diskpart command\" class=\"wp-image-1175\" title=\"\" srcset=\"https:\/\/computingforgeeks.com\/wp-content\/uploads\/2017\/03\/list-disk.png 721w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2017\/03\/list-disk-300x160.png 300w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2017\/03\/list-disk-696x372.png 696w\" sizes=\"auto, (max-width: 721px) 100vw, 721px\" \/><\/a><\/figure>\n\n\n\n<p>5. Create a partition. This can be primary or logical depending on your setup. Here I&#8217;m creating a primary partition&nbsp;at the beginning of the free space and spans entire disk.\n<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">create partition primary<\/pre>\n\n\n\n<p>To specify size, e.g 1 GB, use\n<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">create partition primary size=1024<\/pre>\n\n\n\n<p>To create a logical partition for example:\n<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">create partition extended\ncreate partition logical\nlist partition<\/pre>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/computingforgeeks.com\/wp-content\/uploads\/2017\/03\/create-partition.png\"><img loading=\"lazy\" decoding=\"async\" width=\"814\" height=\"403\" src=\"https:\/\/computingforgeeks.com\/wp-content\/uploads\/2017\/03\/create-partition.png\" alt=\"How to create disk partitions in windows using diskpart command\" class=\"wp-image-1176\" title=\"\" srcset=\"https:\/\/computingforgeeks.com\/wp-content\/uploads\/2017\/03\/create-partition.png 814w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2017\/03\/create-partition-300x149.png 300w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2017\/03\/create-partition-768x380.png 768w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2017\/03\/create-partition-324x160.png 324w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2017\/03\/create-partition-696x345.png 696w\" sizes=\"auto, (max-width: 814px) 100vw, 814px\" \/><\/a><\/figure>\n\n\n\n<p>6. The next step is to create a filesystem on the partition by formatting it. You can assign custom letter as well.\n<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">select partition 1\nactive\nformat fs=ntfs quick label=\"Backup Partition\"\nassign letter=G:<\/pre>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/computingforgeeks.com\/wp-content\/uploads\/2017\/03\/create-filesystem.png\"><img loading=\"lazy\" decoding=\"async\" width=\"840\" height=\"600\" src=\"https:\/\/computingforgeeks.com\/wp-content\/uploads\/2017\/03\/create-filesystem.png\" alt=\"How to create disk partitions in windows using diskpart command\" class=\"wp-image-1177\" title=\"\" srcset=\"https:\/\/computingforgeeks.com\/wp-content\/uploads\/2017\/03\/create-filesystem.png 840w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2017\/03\/create-filesystem-300x214.png 300w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2017\/03\/create-filesystem-768x549.png 768w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2017\/03\/create-filesystem-100x70.png 100w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2017\/03\/create-filesystem-696x497.png 696w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2017\/03\/create-filesystem-588x420.png 588w\" sizes=\"auto, (max-width: 840px) 100vw, 840px\" \/><\/a><\/figure>\n\n\n\n<p>7. Again list disk, partition and volumes created.\n<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">list disk<br>list partition<br>list volume<\/pre>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/computingforgeeks.com\/wp-content\/uploads\/2017\/03\/disk-vol-partition.png\"><img loading=\"lazy\" decoding=\"async\" width=\"732\" height=\"455\" src=\"https:\/\/computingforgeeks.com\/wp-content\/uploads\/2017\/03\/disk-vol-partition.png\" alt=\"How to create disk partitions in windows using diskpart command\" class=\"wp-image-1178\" title=\"\" srcset=\"https:\/\/computingforgeeks.com\/wp-content\/uploads\/2017\/03\/disk-vol-partition.png 732w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2017\/03\/disk-vol-partition-300x186.png 300w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2017\/03\/disk-vol-partition-356x220.png 356w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2017\/03\/disk-vol-partition-696x433.png 696w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2017\/03\/disk-vol-partition-676x420.png 676w\" sizes=\"auto, (max-width: 732px) 100vw, 732px\" \/><\/a><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-how-to-delete-disk-partitions-in-windows-using-diskpart-command\">Deleting disk partitions in Windows using diskpart command<\/h2>\n\n\n\n<p>Deleting a disk partition using diskpart is similar to creating, the difference is only that delete is used instead of create. For example to delete logical partition we created, do: <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>list disk\nselect disk 1\nlist partition\nselect partition 2\ndelete partition\nlist partition<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/computingforgeeks.com\/wp-content\/uploads\/2017\/03\/delete-partition.png\"><img loading=\"lazy\" decoding=\"async\" width=\"840\" height=\"599\" src=\"https:\/\/computingforgeeks.com\/wp-content\/uploads\/2017\/03\/delete-partition.png\" alt=\"How to create disk partitions in windows using diskpart command\" class=\"wp-image-1179\" title=\"\" srcset=\"https:\/\/computingforgeeks.com\/wp-content\/uploads\/2017\/03\/delete-partition.png 840w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2017\/03\/delete-partition-300x214.png 300w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2017\/03\/delete-partition-768x548.png 768w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2017\/03\/delete-partition-100x70.png 100w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2017\/03\/delete-partition-696x496.png 696w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2017\/03\/delete-partition-589x420.png 589w\" sizes=\"auto, (max-width: 840px) 100vw, 840px\" \/><\/a><\/figure>\n\n\n\n<p>To clean entire disk, select it and issue the command clean\n<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">select disk 1<br>clean<\/pre>\n\n\n\n<p>Use the <strong>exit\u00a0<\/strong>command to exit from the diskpart command line interface. To this end, you must have understood how to create disk partitions in Windows using diskpart command. More tutorials on Windows server Administration will come soon. Stay connected for latest guides and reviews.<\/p>\n\n\n\n<p>Other disk related articles:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/computingforgeeks.com\/resize-ext-and-xfs-root-partition-without-lvm\/\" target=\"_blank\" rel=\"noreferrer noopener\">How to resize an ext2\/3\/4 and XFS root partition without LVM<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/computingforgeeks.com\/extending-root-filesystem-using-lvm-linux\/\" target=\"_blank\" rel=\"noreferrer noopener\">How to extend root filesystem using LVM on Linux<\/a>.<\/li>\n\n\n\n<li><a href=\"https:\/\/computingforgeeks.com\/extend-aws-ec2-instance-boot-file-system-without-rebooting\/\" target=\"_blank\" rel=\"noreferrer noopener\">How to extend EBS boot disk on AWS without an instance reboot<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/computingforgeeks.com\/how-to-extend-increase-kvm-virtual-machine-disk-size\/\" target=\"_blank\" rel=\"noreferrer noopener\">How to extend\/increase KVM Virtual Machine (VM) disk size<\/a><\/li>\n\n\n\n<li><a aria-label=\" (opens in a new tab)\" href=\"https:\/\/computingforgeeks.com\/how-to-create-disk-partitions-in-windows-using-diskpart-command\/\" target=\"_blank\" rel=\"noreferrer noopener\">How to create disk partitions in Windows using diskpart command<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/computingforgeeks.com\/working-with-qemu-img\/\" target=\"_blank\" rel=\"noreferrer noopener\">Working with qemu-img in Linux<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>This tutorial will teach you how to create disk partitions in Windows using diskpart command. Apart from how to create disk partitions in Windows using diskpart, you can also delete partitions using the diskpart command in Windows. Diskpart is the default Windows systems command line disk partitioning utility. To demonstrate on how to&nbsp;create disk partitions &#8230; <a title=\"Create disk partitions in Windows using diskpart command\" class=\"read-more\" href=\"https:\/\/computingforgeeks.com\/how-to-create-disk-partitions-in-windows-using-diskpart-command\/\" aria-label=\"Read more about Create disk partitions in Windows using diskpart command\">Read more<\/a><\/p>\n","protected":false},"author":3,"featured_media":1177,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[90,299],"tags":[146,7157,7136,145],"cfg_series":[],"class_list":["post-1172","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-windows","category-how-to","tag-cmd","tag-disk","tag-partition","tag-powershell"],"_links":{"self":[{"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/posts\/1172","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/comments?post=1172"}],"version-history":[{"count":0,"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/posts\/1172\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/media\/1177"}],"wp:attachment":[{"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/media?parent=1172"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/categories?post=1172"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/tags?post=1172"},{"taxonomy":"cfg_series","embeddable":true,"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/cfg_series?post=1172"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}