{"id":881,"date":"2018-07-04T12:19:53","date_gmt":"2018-07-04T10:19:53","guid":{"rendered":"http:\/\/itsimple.info\/?p=881"},"modified":"2018-07-04T12:20:34","modified_gmt":"2018-07-04T10:20:34","slug":"fast-check-disk-on-vms-with-powershell-repair-volume","status":"publish","type":"post","link":"https:\/\/itsimple.info\/?p=881","title":{"rendered":"Fast Check Disk on VMs with Powershell&#8217;s Repair-Volume instead of CHKDSK"},"content":{"rendered":"<p>&nbsp;<\/p>\n<p>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.<\/p>\n<p>First run the scan option from powershell as admin (This Example is on drive D):<\/p>\n<pre class=\"\"><code class=\"lang-powershell\">PS C:\\&gt;<span class=\"hljs-pscommand\">Repair-Volume<\/span><span class=\"hljs-parameter\"> -DriveLetter<\/span> D<span class=\"hljs-parameter\"> -Scan<\/span><\/code><\/pre>\n<p>Then to fast fix the files :<\/p>\n<pre><code class=\"lang-powershell\">PS C:\\&gt;<span class=\"hljs-pscommand\">Repair-Volume<\/span><span class=\"hljs-parameter\"> -DriveLetter<\/span> D<span class=\"hljs-parameter\"> -SpotFix<\/span><\/code><\/pre>\n<p>It can run in offline mode as well taking the partition offline for fixing :<\/p>\n<pre>PS c:\\&gt;Repair-Volume \u2013driveletter D -offlinescanandfix<\/pre>\n<p>*. Note, Drive C can not be taken offline<\/p>\n<p>You can issue scan request on remote servers as well (in this example direv C):<\/p>\n<pre>PS c:\\&gt;Repair-Volume \u2013driverletter c -scan \u2013cimsession computername1,computername2<\/pre>\n<p>More information :<\/p>\n<p><a href=\"https:\/\/docs.microsoft.com\/en-us\/powershell\/module\/storage\/repair-volume?view=win10-ps#examples\">https:\/\/docs.microsoft.com\/en-us\/powershell\/module\/storage\/repair-volume?view=win10-ps#examples<\/a><\/p>\n<hr \/>\n<h3>Good Luck<\/h3>\n","protected":false},"excerpt":{"rendered":"<p>&nbsp; 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 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[21,12,14,15],"tags":[],"class_list":["post-881","post","type-post","status-publish","format-standard","hentry","category-operating-systems","category-tutorials","category-windows","category-windows-server"],"_links":{"self":[{"href":"https:\/\/itsimple.info\/index.php?rest_route=\/wp\/v2\/posts\/881","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/itsimple.info\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/itsimple.info\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/itsimple.info\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/itsimple.info\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=881"}],"version-history":[{"count":0,"href":"https:\/\/itsimple.info\/index.php?rest_route=\/wp\/v2\/posts\/881\/revisions"}],"wp:attachment":[{"href":"https:\/\/itsimple.info\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=881"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/itsimple.info\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=881"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/itsimple.info\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=881"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}