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
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: