Changes

Formatting a Volume from the Command Line
== Formatting a Volume from the Command Line ==
Windows Server 2008 prvides provides the ability to format volumes from the command line using the '''diskpart'' tool. This can be invoked by entering ''diskpart'' either at the command prompt or in a Run dialog. Once started diskpart presents a ''DISKPART'' promot prompt at which commands can be entered.
The first step is to identify the disks on the system. This information is obtained using the ''list disk '' command:
<pre>
</pre>
For the purposes of this tutorial we will be working on a partition on disk 1. To select the required disk use the ''select disk '' command:
<pre>
</pre>
Having selected the disk , the next step is to select the partition which is to be formatted. To obtain a list of partitions on the selected disk the ''list partition '' command is used:
<pre>
</pre>
For this example we are going to format parition partition 3 so need to select this partition using the ''select partition'' command:
<pre>
</pre>
Having made the appropriate selections we are now ready to format the chosen partition. As with formatting through the Disk Management interface a number of options are available. In the first instance the type of file system required must be specified using the ''fs='' directive. Acceptable options include ''FAT'', ''FAT32 '' or ''NTFS''. Alternatively , simply use ''recommended'' to format using the recommended file system. The ''label='' directive allows a volume label to be specified. When using this directive the label name should be encapsulated in double quotes (").
In addition , the ''quick'' directive can may be used to perform a quick format where the dis disk is not checked for errors and ''compress'' may be used with an NTFS format to enable file and folder compression.
The following example performs a quick format of the currently selected partition as NTFS with a volume label of "My Volume":