Do it yourself

How to fix USB drive not accessible or unable to format on Windows 10

When your USB drive, SD card, or another type of drive isn't working on Windows 10, you can use these commands to fix the problem.

Fix USB drive on Windows 10

On Windows 10, if you keep getting the “Please insert a disk into USB drive” message trying to access your USB flash drive, or the “Windows was unable to complete the format” message when trying to reformat the drive, chances are that the drive has corrupted data or something else went totally wrong.

In these types of scenarios, cleaning the drive completely and creating a new partition with the correct settings is likely to fix the problem, and on Windows 10, you can quickly fix this problem with your USB flash drive, SD card, or another removable drive using a few PowerShell commands.

In this guide, you’ll learn the steps to use PowerShell commands to repair any USB flash drive that is not accessible and as a result you can’t reformat on Windows 10.

How to repair a USB drive using PowerShell

This process will completely erase everything stored in the drive. Also, make sure to select the correct drive, as you could accidentally wipe the incorrect storage.

  1. Open Start.

  2. Search for Windows PowerShell, right-click the result, and select Run as administrator.

  3. Type the following command to identify the removable drive you want to repair and press Enter:

    Get-Disk
  4. Type the following command to erase the drive completely and press Enter:

    Get-Disk 1 | Clear-Disk -RemoveData

    In the above command, make sure to change 1 with the disk number of the drive you want to repair. If you specify the number incorrectly, you could end up wiping out the wrong drive causing data loss.

  5. Type Y to confirm that you want to wipe the specified drive and press Enter.

  6. Type the following command to create a new partition using the NTFS file system and assign a name for the USB drive and press Enter:

    New-Partition -DiskNumber 1 -UseMaximumSize | Format-Volume -FileSystem NTFS -NewFileSystemLabel myUSB

    In the above command, make sure to change 1 with the disk number of the drive you want to repair, and change myUSB with the name you want to use for the storage.

  7. Type the following command to assign a drive letter to the USB drive and press Enter:

    Get-Partition -DiskNumber 1 | Set-Partition -NewDriveLetter F
    PowerShell commands to fix USB drive
    PowerShell commands to fix USB drive

    In the above command, make sure to change 1 with the disk number of the drive you want to repair, and change F with the letter you want to assign to the storage.

Once you’ve completed the steps, open File Explorer and navigate to This PC, and you should now be able to access and store data again on your removable drive.

If you’re having trouble with any of the commands, you can get help at the PUREinfoTech forums.