• Is a New iPad Pro Coming Soon?
  • Get It Now: Spring Tech Deals at Amazon

Diskpart Command

Use the 'diskpart' command to manage hard drive partitions

diskpart assign boot disk

  • Emporia State University

In This Article

Jump to a Section

  • Availability

Related Commands

The diskpart Command Prompt command is used to create or delete partitions on hard drives .

Diskpart Command Availability

The diskpart command is available from within the Command Prompt in Windows operating systems, including Windows 11, 10, 8, etc.

You can also access this command from the Recovery Console in Windows 2000 and Windows XP.

Managing partitions is also possible without the use of a command from within any version of Windows using the Disk Management tool, or free disk partition software .

Diskpart Command Syntax

diskpart < parameter >

The availability of certain diskpart command switches and other syntax may differ from operating system to operating system. See  How to Read Command Syntax  if you're not sure how to read the syntax as it's described in this table.

Diskpart Command Examples

Here are some examples showing how the diskpart command can be used:

Create 5 GB Partition

In the above example, the diskpart command creates a 5,000 MB partition on the hard drive located at \Device\HardDisk0 .

Delete Partition by Name

For this one, the diskpart command will remove the Partition1 partition located on the hard drive \Device\HardDisk0 .

Delete Partition by Letter

This command will remove the partition currently assigned the drive letter G .

Select a Disk

Finally, in this multipart command, diskpart is being used to select a particular disk, disk 1 in this example, so we can remove the readonly attribute that's been set on it.

The fixboot , fixmbr , and bootcfg commands are often used with the diskpart command.

Get the Latest Tech News Delivered Every Day

  • Fixboot Command (Recovery Console)
  • AOMEI Partition Assistant Standard Edition v10.3.1 Review
  • Rename Command
  • Dir Command
  • Bootcfg Command
  • Format Command
  • Fixmbr Command (Recovery Console)
  • More Command
  • Copy Command
  • Expand Command
  • Del Command
  • How to Remove Write Protection on a Micro SD Card
  • Net User Command (Examples, Options, Switches, & More)
  • 10 Best Free Disk Partition Software Tools
  • The 34 Best Free Data Destruction Tools of 2024
  • Help Command

IMAGES

  1. How To Create Partition with DiskPart CMD [2023]

    diskpart assign boot disk

  2. diskpart set boot partition windows 10 Archives

    diskpart assign boot disk

  3. Make Bootable Usb Drive Using Diskpart

    diskpart assign boot disk

  4. Format Drive Using Cmd Diskpart ntfs bootable formatting

    diskpart assign boot disk

  5. DiskPart Command Simplified With Examples

    diskpart assign boot disk

  6. DiskPart: Format Disk Partition in Windows 11, 10, 8, 7

    diskpart assign boot disk

VIDEO

  1. Virtual Disk Service Error: The Specified Shrink Size is Too Big [Fixed] #diskpart #virtualdisk

  2. HOW TO SOLVE

  3. Add a partition to Hard Disk (Add Local Disk) in Windows

  4. USB Bellek Boot Yapma Programsız (cmd ile)

  5. USB Bellek ile Format Diski Oluşturma Programsız!

  6. How to Manually Assigning a Drive Letter Using CMD / Diskpart in Windows 11/10 [Solved] #diskpart

COMMENTS

  1. Diskpart Command (Examples, Options, Switches & More)

    Displays information about the selected disk, partition, volume, or virtual hard disk (VHD). Exits the diskpart command interpreter. Expands a virtual hard disk (VHD) to the size that you specify. Extends the volume or partition with focus, along with its file system, into free (unallocated) space on a disk.