guidox / Hardware

Check Whether a USB Drive Really Has the Capacity It Reports

TL;DR

Write a pattern across the reported capacity with **fsutil** or a PowerShell loop, then read it back and compare hashes. Divergence starts exactly at the real capacity.

Before you start

Requirements

  • The suspect USB drive
  • Admin rights
  • 1-3 hours depending on size
Step by step

Instructions

01

Read what the drive claims

The reported size comes from the controller, not from the memory. That is why a counterfeit stick shows the full size in Explorer and fails later.

Get-Disk | Where-Object BusType -eq 'USB' | Select-Object Number,FriendlyName,Size,PartitionStyle,SerialNumber
Get-Volume | Where-Object DriveType -eq 'Removable' | Select-Object DriveLetter,FileSystem,Size,SizeRemaining
Get-CimInstance Win32_DiskDrive | Where-Object InterfaceType -eq 'USB' | Select-Object Model,Size,SerialNumber
02

Back up anything that matters

The test overwrites the drive. Copy the existing content off first, and verify the copy before you start.

$src = 'E:\'
$dst = "$env:USERPROFILE\usb-backup"
New-Item -ItemType Directory $dst -Force | Out-Null
robocopy $src $dst /E /R:1 /W:1 /NFL /NDL
(Get-ChildItem $dst -Recurse | Measure-Object Length -Sum).Sum
03

Write a full-size test file

**fsutil file createnew** writes zeros quickly and uses the full reported capacity. A write that fails near the end already proves the drive cannot hold what it claims.

$free = (Get-Volume -DriveLetter E).SizeRemaining
$freeGB = [math]::Round($free/1GB,2)
fsutil file createnew 'E:\fill.bin' $free
Get-Item 'E:\fill.bin' | Select-Object Name,Length
Get-Volume -DriveLetter E | Select-Object SizeRemaining
04

Read it back and compare

The data is hashed on the way in and on the way out. A mismatch marks the point where the controller started lying, and it only appears after the real capacity.

$in = (Get-FileHash 'E:\fill.bin' -Algorithm MD5).Hash
$in
Copy-Item 'E:\fill.bin' 'C:\temp\fill-check.bin' -Force
$out = (Get-FileHash 'C:\temp\fill-check.bin' -Algorithm MD5).Hash
$out
if ($in -eq $out) { 'match' } else { 'MISMATCH - drive is fake or failing' }
05

Test with many small files as well

A fake controller often handles one large file better than many small ones. A thousand small files across the capacity is the more realistic test.

1..1000 | ForEach-Object { [System.IO.File]::WriteAllText("E:\t$_.txt", ("x" * 1024)) }
Get-ChildItem E:\ -Filter 't*.txt' | Measure-Object | Select-Object Count
Get-ChildItem E:\ -Filter 't*.txt' | Measure-Object Length -Sum | Select-Object Sum
06

Decide what the drive is good for

A drive that fails the read-back should not hold anything you care about. Use it for a scratch copy, label it, and never for a backup.

Get-ChildItem E:\ -Filter 'fill.bin' | Remove-Item -Force
Get-ChildItem E:\ -Filter 't*.txt' | Remove-Item -Force
Get-Volume -DriveLetter E | Select-Object SizeRemaining,Size
Get-Disk | Where-Object BusType -eq 'USB' | Select-Object FriendlyName,HealthStatus
Troubleshooting

Common issues

The write fails immediately

The drive is write-protected or the file system is damaged. Check the write-protect switch and run chkdsk on the volume.

The file writes but the hash differs

Counterfeit or failing NAND. The first difference marks the usable capacity.

The test takes hours

A slow controller on a large stick. Test a smaller region first, then the full capacity overnight.

Explorer shows a different size than Get-Disk

Formatted capacity versus raw capacity. The partition table is what Explorer uses.

FAQ

Frequently asked

Is there a faster test?

A quick partial write finds blatant fakes. Only a full write and read-back proves the whole capacity.

Does formatting help?

No. The controller reports the wrong size regardless of the file system.

Can a fake drive be repaired?

Its real capacity can be reprogrammed with vendor tools, but the memory is what it is. It stays a small drive.

How to undo this

Format the drive with Disk Management or diskpart to remove the test files, and keep the backup copy until you trust the drive again.

Changelog · 1 entry
  1. 2026-11-01
    First version
Interactive version: checklist, feedback, related guides →

Free · no account needed · tracks your progress