Windows - How to format a USB key from the command prompt
Formatting an USB flash drive from the command prompt is really easy. This procedure can be achieved using the format command, which works for most version of Microsoft Windows (Windows 95 up to Windows 8.1).
The procedure is as follows:
Connect the USB flash drive to your PC.
Click on Start > Run > Type cmd and click on OK.
Assuming the letter assigned to the USB flash drive is G, type the following command:
format /q /x G: and press Enter.
The q parameter stands for quick format
The x parameter forces the selected volume to dismount, if needed.
NB: Don't forget to replace the letter "G" with your drive letter.