Is there a utility in DOS or Windows that is as thorough as badblocks on Linux?
The best tool I've ever encountered for testing a hard drive for bad sectors is called SpinRite:
It was created by Steve Gibson (who writes most of his code in Assembler), and I remember using it back in the late 1980s on XT computers (with 4.77 MHz 8086/8088 processors) to recover bad sectors from failing hard drives.
The current version also works very well (and you also get the benefit of the many years of Steve Gibson's experience in maintaining this software to ensure it works reliably with all types of hard drives).
It is far more thorough than the ScanDisk or ChkDsk programs included with DOS and Windows.
chkdsk with the appropriate switch
/R Locates bad sectors and recovers readable information
/b NTFS only: Clears the list of bad clusters on the volume and rescans all allocated and free clusters for errors. /b includes the functionality of /r. Use this parameter after imaging a volume to a new hard disk drive. Works only on vista or better.
To update these answers for anyone who finds this as of 2014:
SpinRite has far better data recovery capability run at the default level 2
Run at level 4 it's equivalent to badblocks non-destructive read write mode, but with better data recovery capabilities.
However it falls over with divide overflows on modern huge drives, you'll need to wait for SpinRite 6.1 to fix this, development has started on 6.1 according to Steve Gibson on the Security Now netcast, but is suspended again while he completes another project.
Meanwhile, the nearest functional Windows based method to recreate the non destructive read/write badblocks mode for large drives requires owning storage equal to or greater than the drive being tested and would proceed thus:
In the above scenario, or when using badblocks a modern drive's internal logic will handle remapping any bad sectors found when they're attempted to be written to.
To recreate the badblocks destructive test you'll need a commercial UK (not US) government approved drive wiping program and you'll need to run it at the higher security level, this will write patterns repeatedly to the drive and verify each pass much as badblocks does.
So until Spinrite 6.1 or later gets released, the question becomes, "Why would you want to do that?"
Downloading pretty much any Linux live CD/DVD will give you a bootable platform to run badblocks, which is cheaper, easier, and safer for your data, for any scenario where you need more than the read only test.
If you want the read only test, just run
If you want to run