3.4. Formatting a Volume
You want to reformat an existing volume or initialize a new one.
Using a graphical user interface
Open Windows Explorer.
Right-click on the drive letter for the volume you want to format and select Format.
Leave NTFS selected for File system unless you have a very good reason to use FAT32. The same goes for the Allocation unit size; use the default selected unless you have a good reason.
Type a description under Volume label.
Check the box beside Quick Format if you've previously formatted the volume with the same filesystem and just want to delete the file table (i.e., links to all the files and folders).
Check the box beside Enable Compression if you want to compress the contents of the volume.
Using a command-line interface
The following command formats the D: drive using NTFS and sets the volume
> format D: /fs:ntfs /v:Data
You will be prompted to enter the current label of the D:
drive. Type it in and press Enter. Then you'll be asked for
confirmation to continue by typing
Y and pressing Enter.
/q option to the
previous command line to perform a quick format and add the
/c option to enable compression on the
volume. You can use the
to force a dismount in case someone has a handle open on the
' This code formats a volume. ' The Win32_Volume class is new in Windows Server 2003. ' ------ SCRIPT CONFIGURATION ------ strComputer = "
<Server>" strDrive = "
<Drive>" ' e.g., D: strFS = ...