If the drive is “Offline” or shows a black bar, right-click the disk label (leftmost gray box) and select “Online” or “Initialize Disk” first. Method 3: Format via Command Prompt (For Power Users) When other methods fail—or you need to script the process—use DiskPart.
Type diskpart and press Enter.
In the lower graphical section, right-click the partition (the blue or black bar) on your target drive. Select “Format…” how to format a drive on windows 10
Open File Explorer (Windows key + E).
Click OK , then OK again. The drive will be formatted. If the drive is “Offline” or shows a
Type cmd in the Windows search bar. Right-click “Command Prompt” and choose “Run as administrator.” how to format a drive on windows 10
Right-click the Start button (or press Windows + X). Select “Disk Management.”