How to repair a disk with PowerShell in Windows Server 2012?

repair-diskSometimes disks got wrong, and you want to repair them. The traditional ways were to use Error Checking or chkdsk command, but a convenient method – that is PowerShell, is also used. 

  1. Open PowerShell console with administrative privileges
  2. Execute Repair-Volume E –Scan (E is your drive letter)
  3. If any errors found, execute Repair-Volume E –Spotfix
  4. Additional parameter is –OfflineScanAndFix, and it is used when you want to do scan and fix the volume simultaneously. Of course it forces Windows to take the volume offline, and then it does the job. If it runs on system drive, it will inevitably scan and fix the volume, the next time you reboot
  5. Wanting to run this command on a remote computer, put –CimSession “Remote Computer Name”, without quotation marks, after the command
  6. At the end, for more information and help, run Get-Help Repair-Volume, as I did in the above picture
%d bloggers like this: