In the old days, disk repair was performed by chkdsk.exe. This still works.
In Windows Server 2012 R2 and Windows 8.1, a new cmdlet called Repair-Volume was added. Like chkdsk.exe, it needs full Administrator privileges.
You can use it to scan drives for errors:
PS> Repair-Volume -Scan -DriveLetter c
You can also use the cmdlet to fix errors:
-OfflineScanAndFix: Takes the volume offline to scan the volume and fix any errors found (equivalent to chkdsk /f).
-SpotFix: Takes the volume briefly offline and then fixes only issues that are logged in the $corrupt file (equivalent to chkdsk /spotfix).
ReTweet this Tip!