DISKPART
(from Disk Partition)
Launches the DISKPART
command interpreter or runs DISKPART
scripts to view or configure disk partition properties.
DISKPART [parameter | /S script]
Where:
parameter
- Specifies theDISKPART
command to execute:ACTIVE
- Marks the selected partition as active.ADD
- Creates a mirror of a simple volume.ASSIGN
- Assigns a drive letter or mount point to the selected volume.ATTRIBUTES
- Changes volume or disk attributes.ATTACH
- Attaches a virtual disk file.AUTOMOUNT
- Enables or disables automatic mounting of basic volumes.BREAK
- Breaks a mirrored volume into two volumes.CLEAN
- Removes configuration information or all information from the disk.COMPACT
- Attempts to reduce the physical size of the file.CONVERT
- Converts disks from one format to another.CREATE
- Creates a volume, partition, or virtual disk.DELETE
- Deletes an object.DETAIL
- Provides details about an object.DETACH
- Detaches a virtual disk file.EXIT
- ExitsDISKPART
.EXTEND
- Extends the specified volume.EXPAND
- Increases the maximum available size of a virtual disk.FILESYSTEMS
- Displays current and supported file systems on the volume.FORMAT
- Formats the partition or volume.GPT
- Assigns attributes to the selected GPT partition.HELP
- Displays the list ofDISKPART
commands.IMPORT
- Imports a group of disks.INACTIVE
- Marks the selected partition as inactive.LIST
- Displays a list of objects.MERGE
- Merges a child disk with its parent elements.ONLINE
- Brings an object currently marked as offline online.OFFLINE
- Takes an object currently marked as online offline.RECOVER
- Refreshes the state of all disks in the selected pack. Attempts to recover disks in an invalid pack and resynchronize mirrored volumes and RAID5 volumes with outdated plex or parity data.REM
- Performs no operation. Used for commenting scripts.REMOVE
- Removes the drive letter or mount point assignment.REPAIR
- Repairs a RAID-5 volume with an invalid member.RESCAN
- Scans the computer again for disks and volumes.RETAIN
- Places a partition where theRETAIN
command was used into a simple volume.SAN
- Displays or sets the SAN policy for the currently loaded operating system.SELECT
- Focuses on an object.SETID
- Changes the partition type.SHRINK
- Shrinks the selected active volume.UNIQUEID
- Displays or sets the GPT identifier or master boot record signature of a disk.
/S script
- Specifies the path and file name of theDISKPART
script to run.
For more information on the syntax and behavior of DISKPART
commands (which are beyond the scope of this guide), visit the related page on Microsoft Learn - DISKPART.
Comments