It`s simple when you know how ! Operating Systems,Tutorials,Windows,Windows server Fast Check Disk on VMs with Powershell’s Repair-Volume instead of CHKDSK

Fast Check Disk on VMs with Powershell’s Repair-Volume instead of CHKDSK

 

Since Windows 2012, microsoft add to powershell the option to check the disk with powershell Repair-Volume camlet . it have the ability to fast scan the disk, even Large disks and mark the corrupted files, then it can spotfix those file fixing the partition very fast.

First run the scan option from powershell as admin (This Example is on drive D):

PS C:\>Repair-Volume -DriveLetter D -Scan

Then to fast fix the files :

PS C:\>Repair-Volume -DriveLetter D -SpotFix

It can run in offline mode as well taking the partition offline for fixing :

PS c:\>Repair-Volume –driveletter D -offlinescanandfix

*. Note, Drive C can not be taken offline

You can issue scan request on remote servers as well (in this example direv C):

PS c:\>Repair-Volume –driverletter c -scan –cimsession computername1,computername2

More information :

https://docs.microsoft.com/en-us/powershell/module/storage/repair-volume?view=win10-ps#examples


Good Luck

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Post