You're in Disk Management, trying to shrink a volume or format an external drive, and out of nowhere you get 0x80070057: The parameter is incorrect. It usually hits when you're resizing a partition that has a lot of small files scattered around, or when you plug in a USB drive that's been formatted on a Mac or a Linux box. The operation just dies. No further explanation. Just that cryptic hex code.
What's actually happening here is that Windows is passing a parameter to the disk driver that it can't make sense of. Often it's a size calculation that overflows or underflows because the volume has a file system structure that doesn't match what the driver expects. It's not hardware failure, and it's not a virus. It's a mismatch between what the OS assumes and what's really on the disk.
The reason this shows up so often with external drives is that many of them come with a hidden system partition or a GPT layout that Windows reads differently than the original formatting tool wrote it. When you try to shrink or format, the driver reads a value that's out of bounds and bails with the invalid parameter error instead of trying to correct it.
The Real Fix Is a Clean Slate
Skip the registry hacks and the sfc /scannow advice. Those don't fix this. The core problem is the disk's metadata, so the fix is to rebuild it. Here's the sequence that works almost every time:
- Back up anything you need off the drive. This step is non-negotiable. The fix below wipes the partition table. If you're shrinking a system drive and can't back up, stop here and use a third-party tool like GParted instead.
- Open an elevated Command Prompt. Click Start, type
cmd, right-click Command Prompt, and select "Run as administrator." - Run DiskPart and clean the disk. Type these commands one at a time:
Replace X with the disk number that's throwing the error. Be absolutely sure you pick the right one.diskpart list disk select disk X cleancleanremoves all partitions and the underlying GPT or MBR structure. This is the blunt instrument that works. - Create a fresh partition. After the clean, type:
That creates one primary partition, formats it as NTFS, and assigns a drive letter.create partition primary format fs=ntfs quick assign - Exit DiskPart by typing
exitand close the Command Prompt.
Now the disk has a clean partition table that matches what Windows expects. The invalid parameter error won't appear because there's no stale metadata left to confuse the driver.
Why This Works
The clean command doesn't just delete partitions. It rewrites the partition table to a blank state. That means any GPT protective MBR, any leftover Apple partition map, or any oddball alignment values are gone. When you create a new partition, Windows writes its own standard values. The parameters passed to the disk driver are now valid by construction.
If you're dealing with a system drive (the one with Windows on it), you can't clean it while it's in use. Boot from a Windows installation USB, press Shift+F10 to open a command prompt, and run the same DiskPart steps there. The principle is identical, just from a different environment.
When This Doesn't Fix It
If the error persists after a clean, the problem is likely the disk's firmware or the connection. Some USB enclosures have a buggy bridge chip that mangles large data transfers. Test the drive by connecting it directly to a SATA port on your motherboard, if you can. If it works there, the enclosure is the problem, not the drive.
Also check the disk's SMART status. Run wmic diskdrive get status in an admin command prompt. If it says "Error" or "Unknown," the drive is failing hardware-wise, and no software fix is going to help. Replace it.
One more edge case: if the error shows up when you're trying to format a drive that's larger than 2TB, make sure you're using GPT, not MBR. MBR caps out at 2TB, and anything above that produces invalid parameters. DiskPart's convert gpt before create partition primary handles that.
Rule of thumb: if DiskPart's clean doesn't fix 0x80070057, the disk is physically compromised or the enclosure is lying to you.
The fix is not glamorous, but it's reliable. I've fixed this on Windows 10 and 11, on both internal and external drives, with the same three commands. The trick is remembering that the error is about metadata, not the files themselves.