1. Open Command Prompt. Enter diskpart
DISKPART> list disk
Disk ### Status Size Free Dyn Gpt
-------- ------------- ------- ------- --- ---
Disk 0 Online 298 GB 0 B
Disk 1 Online 7800 MB 0 B
3. Selects the specified disk:
DISKPART> select disk 1
Disk 1 is now the selected disk.
4. To displays partitions of specified disk:
DISKPART> list part
Partition ### Type Size Offset
------------- ---------------- ------- -------
Partition 1 Primary 7799 MB 32 KB
5. To remove partition/s on specified disk:
DISKPART> clean
DiskPart succeeded in cleaning the disk.
6. To create 4GB primary partition:
DISKPART> create part primary size=4096
DiskPart succeeded in creating the specified partition.
7. To mark current partition as active:
DISKPART> active
DiskPart marked the current partition as active.
8. To quick format current partition as FAT file system:
DISKPART> format fs=fat quick
100 percent completed
DiskPart successfully formatted the volume.
9. To assigns a drive letter to current volume:
DISKPART> assign
DiskPart successfully assigned the drive letter or mount point.
URL: https://technet.microsoft.com/en-us/library/bb490893.aspx?f=255&MSPPError=-2147217396