- Windows 10 may show “Please insert a disk” or “Unable to complete format” due to corruption or errors.
- PowerShell can repair inaccessible USB drives by clearing, partitioning, and formatting them.
On Windows 10, if you keep getting the “Please insert a disk into USB drive” message when 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 the drive has corrupted data, or something else went wrong.
In these scenarios, cleaning the drive thoroughly and creating a new partition with the correct settings are likely to resolve the issue. 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, I’ll explain how to use PowerShell commands to repair any USB flash drive that is inaccessible and, as a result, cannot be reformatted on Windows 10.
- Repair USB flash drive from PowerShell on Windows 10
- FAQs about fixing USB flash drive access on Windows 10
Repair USB flash drive from PowerShell on Windows 10
To repair a USB flash drive with PowerShell commands on Windows 10, use these steps:
-
Open Start on Windows 10.
-
Search for PowerShell, right-click the result, and select the Run as administrator option.
-
Type the following command to identify the removable drive you want to repair and press Enter:
Get-Disk
-
Type the following command to erase the drive and press Enter:
Get-Disk 6 | Clear-Disk -RemoveData
In the above command, make sure to change “6” to the disk number of the drive you want to repair. If you specify the number incorrectly, you could wipe out the wrong drive, causing data loss.
-
Type Y to confirm that you want to wipe the specified drive and press Enter.
-
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 6 -UseMaximumSize | Format-Volume -FileSystem NTFS -NewFileSystemLabel myUSB
In the command above, make sure to change “6” to the disk number of the drive you want to repair, and change “myUSB” to the name you want to use for the storage.
-
Type the following command to assign a drive letter to the USB drive and press Enter:
Get-Partition -DiskNumber 6 | Set-Partition -NewDriveLetter G

In the command above, change “6” to the disk number of the drive you want to repair, and change “G” to the letter you want to assign to the storage.
Once you complete the steps, open File Explorer and navigate to “This PC,” and you should now be able to access and store data on the removable drive.
FAQs about fixing USB flash drive access on Windows 10
Here’s a list of frequently asked questions (FAQs) and answers about the steps to repair a USB flash drive that isn’t accessible on Windows 10.
Why does Windows 10 say “Please insert a disk” for my USB drive?
Windows 10 displays Please insert a disk
when a USB drive is corrupted, unrecognized, or improperly formatted. This error often occurs due to data corruption, hardware issues, or leftover partitions that prevent the system from reading the drive. Using PowerShell to clean and reformat the drive can fix it.
How do I fix “Windows was unable to complete the format” on a USB drive?
This error happens when a USB drive has corrupted data or invalid partitions. On Windows 10, you can resolve it by using PowerShell commands to clear the drive, create a new partition, format it to NTFS or FAT32, and assign a drive letter.
Can I repair an inaccessible USB flash drive with PowerShell?
Yes. PowerShell allows you to repair inaccessible USB drives by clearing all data, creating a new partition, formatting the drive, and assigning a letter. This method works on Windows 10 for USB flash drives, SD cards, and other removable storage devices.
Will using PowerShell erase my USB drive data?
Yes. Running the PowerShell Clear-Disk command permanently deletes all data on the selected drive. Always double-check the disk number to avoid wiping the wrong device before proceeding.
What is the correct process to assign a drive letter in PowerShell?
After formatting a USB drive in PowerShell, use the Set-Partition -NewDriveLetter command. This assigns a new letter to the drive, making it accessible in File Explorer and ready for storing files.
Update April 8, 2026: This guide has been updated to ensure accuracy and reflect changes to the process.