Home | Windows | Network | Interview Questions | Database | Virtualization | Knowledge Base | Contact Us

Related Links



Active Directory FAQ's


Network Interview Questions

SQL Interview Questions

Windows 2003 KB

Windows 2008 KB

Network KB

Knowledge Base Home

SQL Failover Cluster

DiskPart commands Guide

DiskPart is a text-mode command interpreter that enables you to manage objects (disks, partitions, volumes, or virtual hard disks) by using scripts or direct input from a command prompt. Before you can use DiskPart commands, you must first list, and then select an object to give it focus. When an object has focus, any DiskPart commands that you type will act on that object.

You can list the available objects and determine an object's number or drive letter by using the list disk, list volume, list partition, and list vdiskcommands. The list disk, list vdisk and list volume commands display all disks and volumes on the computer. However, the list partition command only displays partitions on the disk that has focus. When you use the list commands, an asterisk (*) appears next to the object with focus.

When you select an object, the focus remains on that object until you select a different object. For example, if the focus is set on disk 0 and you select volume 8 on disk 2, the focus shifts from disk 0 to disk 2, volume 8. Some commands automatically change the focus. For example, when you create a new partition, the focus automatically switches to the new partition.

You can only give focus to a partition on the selected disk. When a partition has focus, the related volume (if any) also has focus. When a volume has focus, the related disk and partition also have focus if the volume maps to a single specific partition. If this is not the case, focus on the disk and partition is lost.


Diskpart command list

The list of sub-commands for Diskpart are shown below. Some commands are not available in Windows XP and they are indicates with an asterisk (*).

ACTIVE - Mark the selected partition as active.
ADD - Add a mirror to a simple volume.
ASSIGN - Assign a drive letter or mount point to the selected volume.
ATTRIBUTES - Manipulate volume or disk attributes.*
ATTACH - Attaches a virtual disk file.*
AUTOMOUNT - Enable and disable automatic mounting of basic volumes.*
BREAK - Break a mirror set.
CLEAN - Clear the configuration information, or all information, off the disk.
COMPACT - Attempts to reduce the physical size of the file.*
CONVERT - Convert between different disk formats.
CREATE - Create a volume, partition or virtual disk. (No virtual disk management in Windows XP.)
DELETE - Delete an object.
DETAIL - Provide details about an object.
DETACH - Detaches a virtual disk file.*
EXIT - Exit DiskPart.
EXTEND - Extend a volume.
EXPAND - Expands the maximum size available on a virtual disk.*
FILESYSTEMS - Display current and supported file systems on the volume.*
FORMAT - Format the volume or partition.*
GPT - Assign attributes to the selected GPT partition.*
HELP - Display a list of commands.
IMPORT - Import a disk group.
INACTIVE - Mark the selected partition as inactive.
LIST - Display a list of objects.
MERGEMerges a child disk with its parents.*
ONLINE - Online an object that is currently marked as offline.
OFFLINE - Offline an object that is currently marked as online.
RECOVER - Refreshes the state of all disks in the selected pack. Attempts recovery on disks in the invalid pack, and resynchronizes mirrored volumes and RAID5 volumes that have stale plex or parity data.*
REM - Does nothing. This is used to comment scripts.
REMOVE - Remove a drive letter or mount point assignment.
REPAIR - Repair a RAID-5 volume with a failed member.
RESCAN - Rescan the computer looking for disks and volumes.
RETAIN - Place a retained partition under a simple volume.
SAN - Display or set the SAN policy for the currently booted OS.*
SELECT - Shift the focus to an object.
SETID - Change the partition type.*
SHRINK - Reduce the size of the selected volume.*
UNIQUEIDDisplays or sets the GUID partition table (GPT) identifier or master boot record (MBR) signature of a disk.*


Reference : http://technet.microsoft.com/en-us/library/cc770877.aspx

Windows Server 2008 Articles            Windows Interview Questions

HTML Comment Box is loading comments...
Designed by Techibird