{
	"id": "bf07139c-913f-46f5-8529-3a685b671e49",
	"created_at": "2026-04-29T02:21:29.990039Z",
	"updated_at": "2026-04-29T08:22:46.19067Z",
	"deleted_at": null,
	"sha1_hash": "5d217f4526176d44617e3e4cfb48fc3f02a1e86a",
	"title": "diskpart",
	"llm_title": "",
	"authors": "",
	"file_creation_date": "0001-01-01T00:00:00Z",
	"file_modification_date": "0001-01-01T00:00:00Z",
	"file_size": 128733,
	"plain_text": "diskpart\r\nBy robinharwood\r\nArchived: 2026-04-29 02:05:07 UTC\r\nApplies to: Windows Server 2022, Windows 10, Windows 8.1, Windows 8, Windows 7, Windows\r\nServer 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012, and Windows\r\nServer 2008 R2, Windows Server 2008\r\nThe diskpart command interpreter helps you manage your computer's drives (disks, partitions, volumes, or virtual\r\nhard disks).\r\nBefore you can use diskpart commands, you must first list, and then select an object to give it focus. After an\r\nobject has focus, any diskpart commands that you type will act on that object.\r\nWhen you select an object, the focus remains on that object until you select a different object. For example, if the\r\nfocus is set on disk 0 and you select volume 8 on disk 2, the focus shifts from disk 0 to disk 2, volume 8.\r\nSome commands automatically change the focus. For example, when you create a new partition, the focus\r\nautomatically switches to the new partition.\r\nYou can only give focus to a partition on the selected disk. After a partition has focus, the related volume (if any)\r\nalso has focus. After a volume has focus, the related disk and partition also have focus if the volume maps to a\r\nsingle specific partition. If this isn't the case, focus on the disk and partition are lost.\r\nTo start the diskpart command interpreter, at the command prompt type:\r\ndiskpart \u003cparameter\u003e\r\nImportant\r\nYou must be in your local Administrators group, or a group with similar permissions, to run diskpart.\r\nYou can run the following commands from the Diskpart command interpreter:\r\nCommand Description\r\nactive Marks the disk's partition with focus, as active.\r\nadd Mirrors the simple volume with focus to the specified disk.\r\nassign Assigns a drive letter or mount point to the volume with focus.\r\nattach vdisk\r\nAttaches (sometimes called mounts or surfaces) a virtual hard disk (VHD) so that it appears\r\non the host computer as a local hard disk drive.\r\nhttps://learn.microsoft.com/en-us/windows-server/administration/windows-commands/diskpart\r\nPage 1 of 6\n\nCommand Description\r\nattributes Displays, sets, or clears the attributes of a disk or volume.\r\nautomount Enables or disables the automount feature.\r\nbreak Breaks the mirrored volume with focus into two simple volumes.\r\nclean Removes any and all partition or volume formatting from the disk with focus.\r\ncompact\r\nvdisk\r\nReduces the physical size of a dynamically expanding virtual hard disk (VHD) file.\r\nconvert\r\nConverts file allocation table (FAT) and FAT32 volumes to the NTFS file system, leaving\r\nexisting files and directories intact.\r\ncreate Creates a partition on a disk, a volume on one or more disks, or a virtual hard disk (VHD).\r\ndelete Deletes a partition or a volume.\r\ndetach vdisk\r\nStops the selected virtual hard disk (VHD) from appearing as a local hard disk drive on the\r\nhost computer.\r\ndetail Displays information about the selected disk, partition, volume, or virtual hard disk (VHD).\r\nexit Exits the diskpart command interpreter.\r\nexpand\r\nvdisk\r\nExpands a virtual hard disk (VHD) to the size that you specify.\r\nextend\r\nExtends the volume or partition with focus, along with its file system, into free (unallocated)\r\nspace on a disk.\r\nfilesystems\r\nDisplays information about the current file system of the volume with focus and lists the file\r\nsystems that are supported for formatting the volume.\r\nformat Formats a disk to accept files.\r\ngpt\r\nAssigns the gpt attribute(s) to the partition with focus on basic GUID partition table (gpt)\r\ndisks.\r\nhelp\r\nDisplays a list of the available commands or detailed help information on a specified\r\ncommand.\r\nimport Imports a foreign disk group into the disk group of the local computer.\r\ninactive\r\nMarks the system partition or boot partition with focus as inactive on basic master boot record\r\n(MBR) disks.\r\nhttps://learn.microsoft.com/en-us/windows-server/administration/windows-commands/diskpart\r\nPage 2 of 6\n\nCommand Description\r\nlist\r\nDisplays a list of disks, of partitions in a disk, of volumes in a disk, or of virtual hard disks\r\n(VHDs).\r\nmerge vdisk Merges a differencing virtual hard disk (VHD) with its corresponding parent VHD.\r\noffline Takes an online disk or volume to the offline state.\r\nonline Takes an offline disk or volume to the online state.\r\nrecover\r\nRefreshes the state of all disks in a disk group, attempt to recover disks in an invalid disk\r\ngroup, and resynchronizes mirrored volumes and RAID-5 volumes that have stale data.\r\nrem Provides a way to add comments to a script.\r\nremove Removes a drive letter or mount point from a volume.\r\nrepair\r\nRepairs the RAID-5 volume with focus by replacing the failed disk region with the specified\r\ndynamic disk.\r\nrescan Locates new disks that may have been added to the computer.\r\nretain Prepares an existing dynamic simple volume to be used as a boot or system volume.\r\nsan Displays or sets the storage area network (san) policy for the operating system.\r\nselect Shifts the focus to a disk, partition, volume, or virtual hard disk (VHD).\r\nset id Changes the partition type field for the partition with focus.\r\nshrink Reduces the size of the selected volume by the amount you specify.\r\nuniqueid\r\nDisplays or sets the GUID partition table (GPT) identifier or master boot record (MBR)\r\nsignature for the disk with focus.\r\nYou can view a list of options associated to each command by running the main command followed by what is\r\navailable to that specific command. Running list by itself will display the four parameters below:\r\nhttps://learn.microsoft.com/en-us/windows-server/administration/windows-commands/diskpart\r\nPage 3 of 6\n\nNote\r\nAfter you run the list command, an asterisk (*) appears next to the object of focus.\r\nTo see available disk(s), run list disk:\r\nlist disk\r\nTo select a disk, run select disk followed by the disk number. For example:\r\nselect disk 1\r\nhttps://learn.microsoft.com/en-us/windows-server/administration/windows-commands/diskpart\r\nPage 4 of 6\n\nBefore disk 1 can be utilized, a partition will need to be created by running create partition primary:\r\ncreate partition primary\r\nLastly, we can perform a quick format of disk 1 to NTFS with the label \"Backup\" by running format fs=ntfs\r\nlabel=Backup quick as seen below:\r\nformat fs=ntfs label=Backup quick\r\nhttps://learn.microsoft.com/en-us/windows-server/administration/windows-commands/diskpart\r\nPage 5 of 6\n\nCommand-Line Syntax Key\r\nDisk management overview\r\nStorage Cmdlets in Windows PowerShell\r\nSource: https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/diskpart\r\nhttps://learn.microsoft.com/en-us/windows-server/administration/windows-commands/diskpart\r\nPage 6 of 6",
	"extraction_quality": 1,
	"language": "EN",
	"sources": [
		"MITRE"
	],
	"origins": [
		"web"
	],
	"references": [
		"https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/diskpart"
	],
	"report_names": [
		"diskpart"
	],
	"threat_actors": [],
	"ts_created_at": 1777429289,
	"ts_updated_at": 1777450966,
	"ts_creation_date": 0,
	"ts_modification_date": 0,
	"files": {
		"pdf": "https://archive.orkl.eu/5d217f4526176d44617e3e4cfb48fc3f02a1e86a.pdf",
		"text": "https://archive.orkl.eu/5d217f4526176d44617e3e4cfb48fc3f02a1e86a.txt",
		"img": "https://archive.orkl.eu/5d217f4526176d44617e3e4cfb48fc3f02a1e86a.jpg"
	}
}