
Step1: Open Windows PowerShell as administrator, and type the following command to analyze your drive. Part2: Defrag hard drive using powershell The c: in the list above refers to the C drive, you can replace c: with any drive letterĮlse on your computer.
defrag.exe c: -v: Use defrage.exe to show detailed analysis and. defrag.exe c: -f: Use defrage.exe to force the defragment even when theįree space is less than 15% on the C partition. defrag.exe c: -w: Use Defrage.exe to perform a full defragment. Which attempt consolidates only the fragments that are smaller than 64MB. defrag.exe c: -r: Use defrage.exe to perform a partial defragmentation. defrag.exe c: -a: Use defrage.exe to analyze the C: drive. defrag.exe -c: Use defrag.exe to defragment all volumes on your. The volume to be defragmented or analyzed Volume: Specifies the drive letter or the mount point path of. parameters: Meaning of different parameters. You can type defrage.exe to show list of command line parameters, and then you can type a a) to analyze or defrag the partition you need to defragment. Type defrag /? or defrag.exe plus the appropriate parameters (e.g. Or you may use the following cmd to defrag a drive. Step1: defrag c: /a to analyze the c drive at first, and then it would tell whether it's recommend to start a defragment. Option: You may use defrag c: /a at first, and then defrag c: /o Note: /o means to optimize a disk partition. Type defrag D: /o if you want to defrag D drive. The methods to access command line are different on Run Command Prompt on your computer with admin privileges To defragment disk partition with Command Prompt, you can follow the steps below: Part1: Defragment Disk Partition with Command Prompt If system reports that there is no need to defragment the drive, you had better not perform diskĭefragment.
It is necessary to analyze the disk drive to see if it needs to be defragmented. You can delete some unnecessary files, move files to another partition or free up disk space to get more free space on the partition.Ģ. Is less than 15%, it can only defrag only a part of fragments. If the available space on the partition you want to defrag Make sure that the disk partition has at least 15% free space in order to complete a defragment of a disk partition. Before disk defragment, you need to do something for preparation.ġ.