How To Format USB Drive Using Command Line

Sometimes Windows does not permit formatting a USB drive using File Explorer. It gives an error message of not being able to format the drive continuously. In this situation, the user can format a USB flash drive using command prompt or PowerShell. 

Here are the steps involved in formatting a USB flash drive using command line tools:

Format the USB drive using CMD (Command Prompt)

To format a USB drive using command prompt, open Command Prompt as Administrator and run the following command:

C:\> format D: /FS:NTFS /A:4096 /V:itechtics-data-drive /Q

Replace D: with the Flash drive letter.

/FS:NTFS means that the drive will be formatted with NTFS filesystem. You can also use other filesystems like FAT, FAT32, exFAT, NTFS, UDF and ReFS.

/A:4096 means that the cluster size will be 4 Kilobytes. The following cluster sizes are supported:

ReFS supports 4096, 64K.

NTFS supports 512, 1024, 2048, 4096, 8192, 16K, 32K, 64K, 128K, 256K, 512K, 1M, 2M.

FAT supports 512, 1024, 2048, 4096, 8192, 16K, 32K, 64K, (128K, 256K for sector size > 512 bytes).

FAT32 supports 512, 1024, 2048, 4096, 8192, 16K, 32K, 64K, (128K, 256K for sector size > 512 bytes).

exFAT supports 512, 1024, 2048, 4096, 8192, 16K, 32K, 64K, 128K, 256K, 512K, 1M, 2M, 4M, 8M, 16M, 32M.

Format the USB drive using PowerShell

To perform the formatting operation using PowerShell, use the following commands:

PS C:\> Format-Volume -DriveLetter D -FileSystem NTFS -FORCE -NewFileSystemLabel itechtics-data-drive

Replace the -DriveLetter D with the USB flash drive letter in your system. The -FileSystem switch will take the same inputs as discussed in the CMD section.

-NewFileSystemLabel will change the label on the flash drive.

You might also like: