MS-DOS DiskPart Command Help

Microsoft DOS diskpart control

Updated:
03/06/2020
past

Computer Hope

DiskPart
is a command-line disk-partitioning utility available for Microsoft operating systems. Yous can use information technology to view, create, delete, and change a computer’s disk partitions.

Availability

The
diskpart
command is available in the Recovery Console and Command Prompt of the post-obit Microsoft operating systems.

  • Windows 2000
  • Windows XP
  • Windows Vista
  • Windows vii
  • Windows 8
  • Windows 10

How to use DiskPart

Your Windows user business relationship must be a member of the Administrators group to use DiskPart.

The DiskPart executable file,
diskpart.exe, has two options:

        diskpart
        [/s
        script] [/?]
/south
script
Execute the DiskPart commands contained in the text file named
script, ane line at a fourth dimension.
/? Brandish the assist message.

If no options are specified, running
diskpart
starts the DiskPart interactive command prompt, where you can run DiskPart commands. For more information nearly how to start DiskPart and run commands, see examples.

DiskPart commands

Note

Most of the post-obit DiskPart commands require you
select
a disk or partition to give it “focus.” To view the disks and partitions that can be selected, use the
listing
command.

By default, if DiskPart encounters an error, it will terminate with a not-zero exit condition.

Some DiskPart commands accept the
noerr
option. If
noerr
is specified, DiskPart ignores any errors encountered, and endeavor to continue with subsequent operations. This option is a potentially dangerous, and should exist used with caution.

Command Subcommands, syntax, and clarification.
agile agile
Marker the selected partition as “agile,” indicating to your estimator’south BIOS or UEFI that this partition contains a bootable system. For example, the segmentation where Microsoft Windows is installed is an active segmentation. Note, only partitions on a basic disk (as opposed to a dynamic deejay, such as a RAID array) tin be marked agile. Annotation, DiskPart does not actually check the contents of the partition to verify that it contains bootable arrangement files.
add add deejay=
n
[align=
n] [wait] [noerr]
Create a mirror of the selected disk object at partitioning
northward, which must exist a elementary volume. Partition
n
must have unallocated space equal to or greater than the size of the selected volume, or the mirror cannot exist created. If successful, the selected simple volume becomes a mirrored book, with the mirror stored in partition
due north. Annotation, this command is not valid in Windows Vista.
assign assign
[letter=
d
|
mountain=
path] [noerr]
Assign a drive letter or mounted folder pathname to the selected book. If no bulldoze letter
d
or mounted folder
path
is specified, the next available letter is assigned. If the drive letter or mounted folder is already in use, the operation fails and reports an fault. Drive letters assigned to removable drives tin be changed. Yous cannot assign drive letters to boot volumes, or volumes which contain the Windows paging file. Y’all cannot assign a bulldoze alphabetic character to an OEM partitioning (exception: Windows PE (pre-installation environs). You cannot assign a bulldoze letter to any GPT (GUID division table) partition, other than a basic data partition. Yous cannot assign a drive letter of the alphabet to an ESP partition. You cannot assign a drive letter to a recovery partition.
attributes attributes disk
[set
|
clear] [readonly] [noerr]
Prepare, articulate, or display the attributes (flags) of the selected disk. The
readonly
flag indicates that the disk is write-protected (read-only). If
set up
is specified, the flag is ready. If
articulate
is specified, the flag is unset. If no options are given, the current disk flags are displayed. Disk flags other than “readonly” may exist displayed, but cannot exist set or cleared.
attributes volume
[{set
|
clear}] [{subconscious
|
readonly
|
nodefaultdriveletter
|
shadowcopy}] [noerr]
Ready, clear, or display the attributes (flags) of the selected volume. The
readonly
flag indicates that the volume is write-protected. The
hidden
flag indicates that the volume should not be displayed in volume lists, e.g., in File Explorer. The
nodefaultdriveletter
flag indicates that the book should not automatically be mounted and assigned a drive letter. The
shadowcopy
flag indicates that the volume is a shadow re-create book, used by the Windows VSS service. If
set
is specified, these flags are set up. If
articulate
is specified, these flags are unset. If no options are given, the current volume flags are displayed. On basic MBR deejay, the hidden, readonly, and nodefaultdriveletter attributes always use to all volumes on the disk. On basic GPT (GUID partitioning table) disks, dynamic MBR disks, and dynamic GPT disks, the attributes utilize only to the selected volume.
attach attach vdisk
[
readonly
] [sd=
sddl-string] [usefilesd] [noerr]
Attaches (mounts) a VHD (virtual hd) or VHDX (Hyper-V virtual hard disk) file. The attached VHD appears every bit a local hard drive. If the VHD already has a disk partition with a valid file system, the virtual disk is as assigned a drive letter. If
readonly
is specified, the disk is mounted in read-only style. If
sd
is specified, and
sddl-string
is a valid SDDL security descriptor string, that descriptor is applied to the entire disk. If
usefilesd
is specified, the security descriptor of the VHD file itself is applied to the unabridged deejay. For more information nearly security descriptors, encounter
create vdisk, below.
automount automount
[enable
|
disable
|
scrub] [noerr]
Configure the AutoMount characteristic, which automatically mounts and assigns drive messages to disks that are newly fastened to the system. If
enable
is specified, new disks will be automatically mounted, and assigned a bulldoze letter and a volume GUID pathname. If
disable
is specified, this feature is disabled. If
scrub
is specified, any existing binder pathnames, drive letters, mounted folder directories, and registry settings are removed for volumes no longer connected to the system. Before Windows Vista, the AutoMount feature is bachelor on bones disk volumes merely. In Vista and newer versions, AutoMount is besides available on dynamic disk volumes.
break interruption disk=
due north
[nokeep] [noerr]
Intermission the selected mirrored book into two unproblematic volumes. Applicable to dynamic disks just. Ane of the simple volumes will retain the mirrored volume’due south assigned bulldoze letter, GUID pathnames, and mounted folder paths, if any. The other book is selected, so y’all can assign it a drive letter. When you do, a GUID pathname is automatically assigned. By default, both simple volumes retain the data of the original mirrored volume. If the
nokeep
choice is specified, just one simple book retains the data, and the other simple is cleared of information, and not selected.
make clean clean
[all]
Remove all partition and volume formatting from the selected deejay. If
all
is specified, every byte on the disk is overwritten to zero, destroying any existing data on the entire disk. On MBR disks, merely the MBR partitioning information and hidden sector information are overwritten. On GPT disks, in add-on to the GPT information, the Protective MBR is overwritten. If
all
is omitted, only the beginning and terminal ane MB of the disk is overwritten to zero. After a successful
clean, the condition of the disk is listed in DiskPart as “UNINITIALIZED.”
compact compact vdisk
Attempt to reduce the size of the selected expandable VHD file. The VHD must be expandable for the performance to succeed. Even if a virtual disk is mounted as read-only, the VHD file can be compacted.
convert convert basic
[noerr]
Convert the selected empty dynamic deejay to a bones disk. All information on the selected disk must be deleted from the deejay, and all its partitions and volumes deleted, or the functioning fails.
convert dynamic
[noerr]
Convert the selected basic disk to a dynamic disk. Any volumes on the disk become simple volumes.
convert gpt
[noerr]
Convert the selected empty basic MBR disk to a basic GPT deejay. All information on the selected deejay must be deleted from the deejay, and all its partitions and volumes deleted, or the operation fails.
convert mbr
[noerr]
Convert the selected empty bones GPT deejay to a basic MBR disk. All data on the selected deejay must be deleted from the disk, and all its partitions and volumes deleted, or the operation fails.
create create partition efi
[size=
n] [offset=
due north] [noerr]
Create an EFI (Extensible Firmware Interface) system partition on the focused basic GPT disk. The partition begins at the disk region get-go from the starting time of the disk by
due north
kilobytes if
offset
is specified, otherwise at the start available location on deejay of adequate size. The size of the sectionalization is
n
megabytes if
size
is specified, otherwise the partition uses all available space on that region of the deejay. If the functioning is successful, the new partition is focused.
create partition extended
[size=
n] [offset=
n] [marshal=
north] [noerr]
Create an extended partition on the focused bones MBR deejay. Simply one extended partition may exist on a disk (you can divide it into logical partitions later). The partition begins at
n
kilobytes if
offset
is specified, otherwise at the first available location of adequate size. The size is
n
megabytes if
size
is specified, otherwise it occupies all bachelor space on deejay beginning at its start. If
align
is specified, the division’s offset will exist rounded to a multiple of
northward
kilobytes, which may ameliorate functioning when using a RAID configuration with LUNs (logical unit numbers).
create partitioning logical
[size=
n] [offset=
n] [align=
north] [noerr]
Create a logical segmentation in the extended partition of the focused basic MBR disk. The sectionalization begins
n
kilobytes from the beginning of the extended partition if
first
is specified, otherwise at the kickoff available space in the extended partition. The size is
n
megabytes if
size
is specified, otherwise it uses all bachelor space in the extended partition beginning at the beginning.
create partition msr
[size=
n] [start=
due north] [noerr]
Create an MSR (Microsoft reserved) sectionalization on the focused GPT deejay. The partition begins at
n
kilobytes if
start
is specified, otherwise at first available location on deejay. The size is
due north
megabytes if
size
is specified, otherwise all available space is used. Use this command with extreme caution, because GPT disks have strict requirements for segmentation layout, and a layout which violates these rules may crusade the disk to go unbootable. On GPT disks used to boot Windows, the EFI organisation partitioning must be the first partition on disk, followed immediately by the MSR partitioning. On GPT disks that do not accept an EFI arrangement division (used for data storage only, no bootable OS on deejay), the MSR partition must be the starting time partition on disk.
create partition primary
[size=
northward] [offset=
n] [id={byte|guid}] [align=
n] [noerr]
Create a primary partitioning on the focused bones disk. The division begins at
northward
kilobytes if
offset
is specified, otherwise at the showtime available space on disk. The size is
northward
megabytes if
size
is specified, otherwise all bachelor space beginning at the offset is used. If
align
is specified, the starting time will be rounded to a multiple of
n
kilobytes, which tin can amend functioning on RAID configurations that utilize LUNs. The default partition type is “no filesystem” for MBR disks, or “basic information partition” for GPT disks.

When the segmentation is successfully created, it is automatically focused past DiskPart. A drive letter must manually exist assigned with the
assign
command.

The partition type may be manually specified with the
id
option. Notation that this option is intended for OEM use only. For MBR disks, the partition type
byte
is specified equally a hexadecimal value with the leading 0x removed (east.one thousand., 06 for “no filesystem,” or 27 for “recovery partition”). For GPT disks, segmentation type is specified by a
guid
value (such as ebd0a0a2-b9e5-4433-87c0-68b6b72699c7 for “basic information partition,” or de94bba4-06d1-4d40-a16a-bfd50179d6ac for “recovery partition”). To see a list of recognized partition types, run
assist create partition primary.

Use caution when using the
id
option. The
byte
or
guid
value you specify volition exist set, fifty-fifty if it’southward unrecognized or wrong. Incorrect use of the
id
option tin cause the calculator to become unbootable.

create volume raid
[size=
n]
deejay=
north
,
northward,n[,
n[,…]] [align=
n
[noerr]
Create a raid-5 volume from iii or more dynamic disks. The disks to exist used must be specified with the
disk
parameter, with drive numbers separated past commas, eastward.g.,
deejay=iii,4,vii
or
deejay=5,6,7,eight. If
align
is specified, all book extents are rounded to a multiple of
north
kilobytes, which may better performance with a hardware RAID LUN configuration. When the operation succeeds, the new volume is automatically focused. Note that RAID-5 volumes are non supported in Windows Vista.
create volume simple
[size=
n] [deejay=
n] [align=
n] [noerr]
Create a unproblematic book on the focused dynamic disk, or the disk specified with the
disk
parameter. Its size is
n
megabytes if
size
is specified, otherwise it uses all bachelor space on the disk. If
marshal
is specified, the book boundaries will be rounded to a multiple of
n
kilobytes, which can improve hardware RAID functioning. When the volume is successfully created, the new volume is automatically focused.
create volume stripe
[size=
n] [disk=
n
,
n
,
n[,
n[,…]]] [align=
n] [noerr]
Create a striped volume using two or more dynamic disks. The disk numbers must be specified past the
deejay
parameter as a comma-separated list, eastward.g.,
disk=3,4
or
disk=four,v,7. The size of the volume is
northward
megabytes if
size
is specified, otherwise it uses the maximum free space on the smallest disk, and an equal corporeality of infinite on the other disks. If
align
is specified, volume boundaries are rounded to multiples of
n
kilobytes. When the book is successfully created, it is automatically focused.
create book mirror
[size=
due north]
disk=
northward
,
north
,
northward[,
n[,…]] [align=
northward] [noerr]
Create a mirror book using two dynamic disks. The disks must be specified past number with
disk, e.g.,
deejay=ii,3
or
deejay=3,five. The size of the partition is
due north
megabytes if
size
is specified, otherwise it uses the remaining gratis infinite on the smaller disk, and an equal amount of space on the other. If
align
is specified, volume boundaries are rounded to a multiple of
north
kilobytes, which tin can better functioning in hardware RAID configurations that use LUNs. When the volume is successfully created, the new book is automatically focused.
create vdisk file=”
filename

maximum=
due north
[type={fixed|expendable}] [sd=
sddl-string] [parent=”
parentfile
] [source=”
sourcefile
] [noerr]
Create a virtual deejay file. The VHD and VHDX file formats are supported, and are specified by file extensions
.vhd
or
.vhdx. The destination file proper name is specified with the required
file
parameter, where
destfile
is the consummate path and file name of the destination virtual disk file, eastward.g., “C:\my-vdisk.vhd”. The
maximum
parameter sets the maximum disk space exposed past the virtual disk to
north
megabytes. The
type
parameter specifies if the disk size is
fixed
(size tin never be changed, default) or
expandable
(gratuitous space in the disk file can be expanded or compacted later).

If
source
is specified, the new virtual disk is populated with data from existing virtual disk
sourcefile. If
parent
is specified, the virtual disk is created as a Hyper-V differencing disk, containing only the block data contradistinct from
parentfile, an existing virtual disk of the same size. The security descriptor of the virtual deejay is fix to friction match the parent directory of the destination file, or to the SDDL format string
sddl-string
if
sd
is specified. For details about valid SDDL strings, run
help create vdisk.

delete delete disk
[override] [noerr]
Delete the focused missing dynamic disk from the deejay list. If
override
is specified, DiskPart deletes all unproblematic volumes on the disk. If the disk contains half of a mirrored volume, the half of the mirror on the disk is deleted. An
override
fails if the disk is a member of a RAID-5 volume.
delete partition
[override] [noerr]
Delete the focused basic disk partition. If it’south a organization sectionalisation, kicking partition, or if it contains an active paging file or crash dump file, it cannot be deleted. Partitions on dynamic disks cannot be deleted.
delete volume
[noerr]
Delete the focused volume. If it’southward a system volume, kick volume, or contains an agile paging file or crash dump file, information technology cannot exist deleted.
detail detail disk
Display the properties of the focused disk, and list its volumes.
detail sectionalization
Display the backdrop of the focused partition.
particular book
Display the properties of the focused volume, and list the disks on which the volume resides.
detail vdisk
Display the backdrop of the focused virtual disk.
detach disassemble vdisk
[noerr]
Detach the specified virtual disk.
go out exit
Exit DiskPart.
extend extend
[size=
n] [disk=
n] [noerr]
Extend the focused volume or partition, and optionally its file organisation, into unallocated infinite on a disk. The volume is expanded by
north
megabytes if
size
is specified, otherwise all available space is used. If
disk
is specified, and the focused volume or sectionalisation is a dynamic disk, the extension occurs on disk number
due north; otherwise, information technology occurs on the original disk. On basic disks, the expansion must always occur on the same disk, in space immediately post-obit the original.

On dynamic disks with simple or spanned volumes, a book can be extended to any free space on any dynamic deejay. Mirrored, RAID-5, and striped volumes cannot be extended.

If the partition was previously formatted with NTFS,
aggrandize
fails, and brand no changes.

extend filesystem
[noerr]
Extend the file system of an expanded volume or partition. Run this later on the original
expand
command to expand the file arrangement as well.
aggrandize expand vdisk maximum=
due north
Aggrandize the maximum size available on the focused virtual disk. The required
maximum
parameter sets the new full size to
northward
megabytes. For example,
maximum=30000
sets the new maximum size of the virtual deejay to 30 gigabytes.
filesystems filesystems
Brandish information about the file system of the selected volume, and a list of supported file systems that can format it.
format format
[fs=
fstype] [revision=
X.20] | [recommended] [label=”
label
] [unit of measurement=
northward] [quick] [shrink] [override] [duplicate] [nowait] [noerr]
Format the focused volume. The file organisation
fstype
is used if
fs
is specified, otherwise the default file organisation listed by the
filesystems
command is used. If a specific revision of the file system is desired, information technology can be specified with
revision. If
characterization
is specified, the volume label is set to
characterization. If
unit
is specified, the default allocation unit of measurement size is overridden and set to
north
bytes. If
quick
is specified, a quick format is performed. If
shrink
is specified and
fs=NTFS, the NTFS file arrangement volition compress files by default. If
override
is specified, DiskPart attempts to strength unmount the volume before formatting. If
duplicate
is specified and
fs=UDF
(Universal Disk Format) revision ii.5 or college, file organisation metadata is duplicated to a second set of sectors on the deejay (metadata redundancy). If
nowait
is specified, the command returns to the prompt immediately, and performs the format in the background.
gpt gpt attributes=
northward
Assign the specified GPT attributes to the focused sectionalization on a basic GPT deejay. This command is intended for OEM or IT professional person utilize but. For detailed information nearly valid hexadecimal values of
n, run
help gpt.
assist help
[control] [subcommand
…]
Display a list of commands and subcommands with the syntax and descriptions. For instance,
help,
help assist,
aid create, or
help create sectionalisation efi.
import import
[noerr]
Import all disks in the same disk group equally the focused foreign disk into the local computer’due south online deejay group. A “strange disk” is whatever dynamic deejay installed locally that was previously used on some other computer, or another version of Windows. After import, the dynamic disk volumes become visible and accessible.
inactive inactive
Mark the focused partition of a basic MBR disk as inactive. Note, if the partition is a organisation or kicking partition, the reckoner may not be able to boot until the disk is marked active once more.
listing listing disk
Brandish a list of disks that can exist accessed by DiskPart, and information almost them. The focused disk is marked with an asterisk (*).
list sectionalization
Display a listing of accessible partitions on the focused deejay. On dynamic disks, partitions listed may non exactly stand for to the dynamic volumes on the deejay. Partitions cannot be created or deleted on a dynamic deejay.
listing volume
Brandish a list of basic and dynamic volumes mounted on the local system.
listing vdisk
Brandish a listing of virtual disks. The disk type is listed every bit “unknown” until the deejay is attached. Any disks with focus are marked with an asterisk (*).
merge merge vdisk depth=
n
Merge the focused child Hyper-V differencing deejay with its parent virtual disk. The
depth
parameter may be used if the disk has multiple parents, to specify how deeply the kid should exist merged. For instance,
depth=2
would merge the child with its parent and grandparent. If not specified, the default depth is
one, which merges the child with its parent.
online online deejay
[noerr]
Bring the focused offline deejay (in offline SAN mode) online. If the deejay is dynamic, read-simply, and offline, and you want to bring it online in read-write manner, first enable read-write mode, and then bring the disk online. An offline read-just dynamic disk will written report an error if brought online, because the operation requires writing to the dynamic disk database on the disk.
online volume
[noerr]
Bring the focused offline book online. Not applicable to OEM, ESP, or recovery partitions.
offline offline disk
[noerr]
Accept the focused online disk (in online SAN mode) offline. Not applicable to OEM, ESP, or recovery partitions.
offline volume
[noerr]
Take the focused online volume offline.
recover recover
[noerr]
Refreshes the state of all disks in the pack which contains the selected dynamic disk. Hither, “deejay pack” refers to a set of dynamic disks used in a mirroring or RAID-5 configuration. The
recover
control attempts to resynchronize any volumes in the pack that have dried plex or parity data.
rem rem
[remark]
Does nothing. Use
rem
to include comments in a DiskPart script.
remove remove
[letter=
d
|
mount={path|all}] [dismount] [noerr]
Remove mount points of the focused book, and optionally dismount (unmount) the volume. If
letter
is specified, the drive alphabetic character
d
is removed, or if
mount
is specified, the mounted pathname
path
is removed. If
all
is specified, all mount points are removed for the volume. The
dismount
selection attempts to unmount the book, which is simply possible if all mount points are removed. Mountain points for system or boot volumes, or volumes containing an active paging file, cannot be removed.
repair repair disk=
n
[marshal=
due north] [noerr]
Attempt to repair the focused RAID-v book containing a failed disk, by replacing the failed disk with another, specified deejay. The required parameter
disk
specifies the disk number,
north, which is to supercede the failed disk. The replacement disk must accept gratis space greater than or equal to the size of the failed deejay. If the
marshal
parameter is specified, volume extents are aligned to a multiple of
due north
kilobytes, which can increase functioning in hardware RAID configurations that use LUNs.
rescan rescan
Rescan the figurer for attainable disks and volumes.
retain retain
Set up the focused dynamic unproblematic book to be used equally a arrangement or kicking volume.
san san
[policy={OnlineAll
|
OfflineAll
|
OfflineShared
|
OfflineInternal}] [noerr]
Display or set the SAN policy for the currently booted operating system. With no parameters, the current SAN policy is displayed. The
policy
parameter may be specified to set up the SAN policy. The default policy for Windows Advanced Server and Windows Data Centre is
OfflineShared, where the kick disk is brought online and all disks not on a shared motorcoach in read-only style. On all other versions of Windows, the default policy is
OnlineAll, where all disks are brought online, in read-write style. The
OfflineAll
policy specifies that all disks except the boot deejay are taken offline, and are read-simply by default. The
OfflineInternal
policy specifies that all newly discovered internal disks are kept offline and read-only by default.
select select disk
{n
|
system
|
next
|
path}
Select (focus) a disk. The disk may be specified by disk number,
n. If the disk is specified as
system, on BIOS computers, BIOS disk 0 is focused, or on EFI machines, the disk containing the ESP sectionalisation is focused. If the disk is specified as
next, and a deejay currently has focus, the next disk in the list will be focused.
select partition
n
Select (focus) segmentation
n
on the currently focused deejay.
select volume={n
|
d}
Select (focus) a book. The volume may be identified by volume number
n, or by drive letter of the alphabet or mounted binder pathname
d. For example,
volume=ii,
volume=C, or
volume=C:\MyMount.
select vdisk file=”
filename

[noerr]
Select (focus) a virtual deejay. The disk is specified with the
file
parameter, where
filename
is the complete path and file proper name of the virtual disk file. For case,
file=”C:\vhd\myVdisk.vhd”.
fix set id={byte|guid} [override] [noerr]
Change the partitioning type of the focused division. Note, this control is intended for use by OEMs or Information technology professionals just. The type is specified with the
id
parameter. If it’s an MBR partition, the type is a hexadecimal
byte
value with the leading 0x removed, e.grand., 06 for “no filesystem.” Note, the
byte
value 42 (LDM partition type) cannot be set with this command. If the partition is a GPT partition, the type can be set with a
guid
value, e.g., ebd0a0a2-b9e5-4433-87c0-68b6b72699c7 for “basic data partition.” Annotation, DiskPart does non cheque
byte
or
guid
for validity, and may set the value even if it’s invalid or incorrect, which may cause data loss. Do not utilise this command if you are not an equipment manufacturer or It professional. The proper way to prepare partition type is at cosmos time; run into
create partition, in a higher place, for more data.

Before DiskPart attempts to change the sectionalization type, it attempts to lock and unmount the file system. If the lock and unmount fails, the segmentation type is not gear up, and an fault is reported. However, if
override
is specified, DiskPart attempts to force-unmount the file organisation, fifty-fifty if information technology will not unmount gracefully.

The control
setid
is an alias for
gear up id.

shrink compress
[desired=
target] [minimum=
min] [nowait] [noerr]
Reduce the maximum size of the focused volume, removing some or all the complimentary disk space it contains. If no parameters are specified, the size is reduced to eliminate all complimentary space. If
desired
is specified, DiskPart tries to shrink the volume and then its new total size is
target
megabytes. If
minimum
is specified, DiskPart tries to reduce the original size by
n
megabytes.

Note, some files, for instance the paging file or the shadow copy storage area, sometimes cannot exist relocated. These “unmovable” files foreclose DiskPart from consolidating the free space, which tin interfere with the shrinking procedure. If the shrink fails, view your
Application Logs
(in Upshot Viewer, click
Windows Logs
then
Awarding) and search for
Event 259
to identify the unmovable file that aborted the shrink process. Y’all can resolve the issue by reconfiguring your paging file. (In File Explorer, right-click
This PC
or
My Computer, and choose
Properties
to open the
System Backdrop. Click
Advanced arrangement settings. In the
Advanced
tab,
Performance
section, click
Settings. In the
Advanced
tab,
Virtual memory
department, click
Modify). Unmovable shadow copy files may be reconfigured, moved, or deleted (e.g., with
wmic shadowcopy, or in
System Backdrop, under
System Protection).

shrink querymax
[noerr]
Display the maximum number of bytes that can be removed from the focused volume. The amount displayed represents the corporeality of costless infinite currently available in the volume. If the volume is currently in use, this value may vary as writes occur on the disk.
uniqueid uniqueid disk
[id={dword
|
guid}] [noerr]
Displays or sets the GPT (GUID segmentation table) identifier or MBR (master kicking record) signature of the focused disk. If no parameters are provided, the ID of the focused disk is displayed. If the
id
parameter is specified, the ID is set up to the four-byte hexadecimal value
dword
for MBR disks, or to GUID
guid
for GPT disks.
Popular:   I'm 14 and I want to learn ethical hacking at a young age.

Examples

To start DiskPart, run the
diskpart
command, from the Run box or a Command Prompt. In Windows versions previous to Windows x, the command requires you run a Control Prompt as Administrator. In Windows ten, if
diskpart
is run past a non-ambassador, answer
Yes
at the UAC prompt to keep.

diskpart

You will exist presented with the
DISKPART>
prompt, where you can run DiskPart commands.

DiskPart commands

list disk

List available disks. Sample output:

        Disk ###  Status         Size     Costless     Dyn  Gpt   --------  -------------  -------  -------  ---  ---   Disk 0    Online          476 GB   449 MB   Disk 1    Online         2047 GB      0 B   Disk ii    No Media           0 B      0 B   Disk 3    No Media           0 B      0 B   Disk 4    No Media           0 B      0 B   Deejay 5    No Media           0 B      0 B
select disk 0

Select (focus)
Deejay 0. Subsequent commands that operate on a focused deejay use this disk.

Disk 0 is now the selected disk.
list division

List the partitions on the focused deejay. Sample output:

        Partition ###  Blazon              Size     Offset   -------------  ----------------  -------  -------   Partition one    Primary            549 MB  1024 KB   Segmentation ii    Primary            195 GB   550 MB   Partition 0    Extended           269 GB   195 GB   Segmentation 4    Logical             29 GB   195 GB   Partition v    Logical             29 GB   225 GB   Partition 6    Logical              eight GB   254 GB   Partition seven    Logical            202 GB   262 GB   Partition 3    Recovery           502 MB   465 GB
select partition 1

Select (focus) partition 1 on the focused deejay.

Partition 1 is now the selected partition.
item partition

Display detailed information about the focused partitioning. Sample output:

Partition 1 Type  : 07 Hidden: No Agile: Yeah Offset in Bytes: 1048576   Volume ###  Ltr  Label        Fs     Type        Size     Status     Info   ----------  ---  -----------  -----  ----------  -------  ---------  -------- * Volume 0         System Rese  NTFS   Partition    549 MB  Salubrious    System

Popular:   Do private investigators use computer/mobile hacks to investigste their targets?

Source: https://www.computerhope.com/diskpart.htm