How to use diskpart to edit partition attributes

Written by jim campbell
  • Share
  • Tweet
  • Share
  • Email

Diskpart is an MS-DOS command line utility used to edit, delete and modify hard drive attributes. The Diskpart utility is typically used by network or system administrators to manage disks without the need for loading a graphical interface. The Diskpart utility is included with Windows 2003, 2008, and desktop versions of the operating system. The "attributes" switch is used to edit the attributes on the hard drive.

Skill level:

Other People Are Reading


  1. 1

    Click the Windows "Start" button on the computer that contains the hard drive you want to manage. Type "cmd" into the search text box and press "Enter." Type "diskpart" and press "Enter" to start the utility.

  2. 2

    Type "select disk=x" where "x" is the drive letter for your hard drive. This sets the drive as the "active" drive, so the commands you type are executed against the drive letter.

  3. 3

    Type "attributes disk set x" where "x" is the attribute. For instance, if you want to make the disk "read only," type "attributes disk set read only" and press "Enter" to edit the attributes.

Tips and warnings

  • You can delete partitions in Diskpart. Avoid any delete commands, unless you are sure you want to delete the partition.

Don't Miss

  • All types
  • Articles
  • Slideshows
  • Videos
  • Most relevant
  • Most popular
  • Most recent

No articles available

No slideshows available

No videos available

By using the site, you consent to the use of cookies. For more information, please see our Cookie policy.