Optimize and Defrag Drives in Windows 10  

Page 13 of 16 FirstFirst ... 31112131415 ... LastLast

  1. Posts : 18,044
    Win 10 Pro 64-bit v1909 - Build 18363 Custom ISO Install
       #120

    Thanks @Brink,

    Brink said:
    I haven't tested this, but you might see if using the asterisk "*" symbol instead of a drive letter to see if it may apply to all.

    I will try that later when I get home.



    Just to clarify please. I know the above is untested at the moment, but are you saying that using [ if it DOES work ] . . .

    Code:
    
    Optimize-Volume -DriveLetter * -Verbose

    . . . will possibly Defrag/TRIM ALL the Drives, regardless of whether it is a SSD/HHD WITHOUT any harm?

    Thanks.
      My Computer


  2. Posts : 68,677
    64-bit Windows 11 Pro for Workstations
    Thread Starter
       #121

    Paul Black said:
    Thanks @Brink,


    I will try that later when I get home.



    Just to clarify please. I know the above is untested at the moment, but are you saying that using [ if it DOES work ] . . .

    Code:
    
    Optimize-Volume -DriveLetter * -Verbose

    . . . will possibly Defrag/TRIM ALL the Drives, regardless of whether it is a SSD/HHD WITHOUT any harm?

    Thanks.
    I'm not sure it will work, but that would be the command to test.

    It should automatically Defrag or TRIM as properly needed for the drive, but you could add the "/O" switch to make sure.
      My Computers


  3. Posts : 18,044
    Win 10 Pro 64-bit v1909 - Build 18363 Custom ISO Install
       #122

    Brink said:
    I'm not sure it will work, but that would be the command to test.

    It should automatically Defrag or TRIM as properly needed for the drive, but you could add the "/O" switch to make sure.
    Thanks. I will post the results when I have tested it.
      My Computer


  4. Posts : 18,044
    Win 10 Pro 64-bit v1909 - Build 18363 Custom ISO Install
       #123

    Hello @Brink,

    I have performed some testing etc. The different tests and results are given below along with my findings and conclusion.



    Test 1 & 2:

    I tested Optimize-Volume -DriveLetter * -Verbose, with and without the quotes in CMD Prompt [ added PowerShell at the beginning ] and PowerShell. BOTH reported . . .

    Code:
    
    Optimize-Volume : No MSFT_Volume objects found with property 'DriveLetter' equal to '*'.

    Test 3 & 4:

    I tested Optimize-Volume -DriveLetter * /O -Verbose, with and without the quotes in CMD Prompt [ added PowerShell at the beginning ] and PowerShell. BOTH reported . . .

    Code:
    
    Optimize-Volume : A positional parameter cannot be found that accepts argument '/O'

    Test 5:

    I tested defrag /C /O in CMD Prompt and it performed the Command on ALL Drives [ HDD AND SSD ].

    Test 6:

    I tested defrag /C /O in PowerShell and it performed the Command on ALL Drives [ HDD AND SSD ].

    Test 7:

    I tested PowerShell defrag /C /O in CMD Prompt and it performed the Command on ALL Drives [ HDD AND SSD ].



    Results for Tests 5, 6, & 7:

    ALL the output was identical EXCEPT that the output in CMD Prompt gave a little bit extra information as opposed to what PowerShell gave.

    This is the EXTRA bit of information given . . .

    Code:
    
    Invoking defragmentation on (G:)...
    
    
    
    Pre-Optimization Report:
    
            Volume Information:
                    Volume size                 = 74.52 GB
                    Free space                  = 74.43 GB
                    Total fragmented space      = 0%
                    Largest free space size     = 49.61 GB
    
            Note: File fragments larger than 64MB are not included in the fragmentation statistics.
    
    The operation completed successfully.

    This is what PowerShell reported . . .

    Code:
    
    Invoking defragmentation on (G:)...
    
            Free Space Consolidation:  100% complete.
    
    The operation completed successfully.

    Here is the FULL output for my Drives . . .

    Code:
    
    C:\Windows\system32>defrag /C /O
    
    Microsoft Drive Optimizer
    Copyright (c) Microsoft Corp.
    
    Invoking retrim on System Reserved...
    
            Retrim:  100% complete.
    
    The operation completed successfully.
    
    Post Defragmentation Report:
    
            Volume Information:
                    Volume size                 = 578.99 MB
                    Free space                  = 128.65 MB
    
            Retrim:
                    Total space trimmed         = 0 bytes
    
    Invoking defragmentation on (E:)...
    
    
    Pre-Optimization Report:
    
            Volume Information:
                    Volume size                 = 74.52 GB
                    Free space                  = 21.08 GB
                    Total fragmented space      = 0%
                    Largest free space size     = 18.60 GB
    
            Note: File fragments larger than 64MB are not included in the fragmentation statistics.
    
    The operation completed successfully.
    
    Post Defragmentation Report:
    
            Volume Information:
                    Volume size                 = 74.52 GB
                    Free space                  = 21.08 GB
                    Total fragmented space      = 0%
                    Largest free space size     = 18.60 GB
    
            Note: File fragments larger than 64MB are not included in the fragmentation statistics.
    
    Invoking defragmentation on (G:)...
    
    
    Pre-Optimization Report:
    
            Volume Information:
                    Volume size                 = 74.52 GB
                    Free space                  = 74.43 GB
                    Total fragmented space      = 0%
                    Largest free space size     = 49.61 GB
    
            Note: File fragments larger than 64MB are not included in the fragmentation statistics.
    
    The operation completed successfully.
    
    Post Defragmentation Report:
    
            Volume Information:
                    Volume size                 = 74.52 GB
                    Free space                  = 74.43 GB
                    Total fragmented space      = 0%
                    Largest free space size     = 49.61 GB
    
            Note: File fragments larger than 64MB are not included in the fragmentation statistics.
    
    Invoking retrim on (F:)...
    
            Retrim:  100% complete.
    
    The operation completed successfully.
    
    Post Defragmentation Report:
    
            Volume Information:
                    Volume size                 = 9.99 GB
                    Free space                  = 61.85 MB
    
            Retrim:
                    Total space trimmed         = 71.37 MB
    
    Invoking retrim on (C:)...
    
    
    The operation completed successfully.
    
    Post Defragmentation Report:
    
            Volume Information:
                    Volume size                 = 33.79 GB
                    Free space                  = 6.03 GB
    
            Retrim:
                    Total space trimmed         = 10.59 GB
    
    Invoking retrim on (D:)...
    
            Retrim:  100% complete.
    
    The operation completed successfully.
    
    Post Defragmentation Report:
    
            Volume Information:
                    Volume size                 = 29.29 GB
                    Free space                  = 3.39 GB
    
            Retrim:
                    Total space trimmed         = 3.40 GB
    
    



    Conclusion:

    As you can see from the above results, running defrag /C /O in EITHER CMD Prompt or PowerShell CORRECTLY performs the Command regardless of whether it is a HDD/SSD.

    It basically Defrags HDD's and Retrims SSD's.

      My Computer


  5. Posts : 68,677
    64-bit Windows 11 Pro for Workstations
    Thread Starter
       #124

    Great news @Paul Black.
      My Computers


  6. Posts : 18,044
    Win 10 Pro 64-bit v1909 - Build 18363 Custom ISO Install
       #125

    Brink said:
    Great news @Paul Black.
    Thank you.

    I don't know if you want to add a note to the Tutorial that it automatically selects the CORRECT method [ Defrag or Trim ] regardless of whether it is a HDD/SSD?
      My Computer


  7. Posts : 68,677
    64-bit Windows 11 Pro for Workstations
    Thread Starter
       #126

    Paul Black said:
    Thank you.

    I don't know if you want to add a note to the Tutorial that it automatically selects the CORRECT method [ Defrag or Trim ] regardless of whether it is a HDD/SSD?
    Done.
      My Computers


  8. Posts : 18,044
    Win 10 Pro 64-bit v1909 - Build 18363 Custom ISO Install
       #127

    Brink said:
    Done.
      My Computer


  9. Posts : 15
    Windows 10
       #128

    New member here, in desperate need of help. I have an HP Stream 11 with Windows 10. I didn't know about SSD before I bought it and didn't realize the SSD was only 32GB. It was an emergency purchase when my previous laptop (with HDD spinner) unexpectedly died and I needed something immediately. I've started getting "volume is too defragmented" errors when I try and do just about anything. And after hours of web surfing I found this post and thought it would fix things, but so far it hasn't worked for me.

    Using elevated Powershell (run as Admin), I ran Optimize-Volume -DriveLetter C -Analyze -Verbose and learned the SSD is 65% fragmented. So I ran the Optimize-Volume -DriveLetter C -Verbos, but nothing happened, it is still 65% fragmented. At this point I did confirm that trim is enabled on my laptop, NTFS DisableDeleteNotify = 0. So, then I ran Optimize-Volume -DriveLetter C -ReTrim -Verbose, and no success, it's still 65% fragmented. It does recommend to "defragment" this volume, but I didn't want to actually try using the D-word until I asked about it here (see attached picture).

    Lastly, I tried defrag /C /O, that didn't work either. Do you have any suggestions for what I could try next to get rid of this 65% fragmentation? Also, the 2.82GB free space I have is normal, I've been working with that amount of space (sometimes less) for years. I would greatly appreciate any help!!!

    Optimize and Defrag Drives in Windows 10-trim-report.png
      My Computer


  10. Posts : 68,677
    64-bit Windows 11 Pro for Workstations
    Thread Starter
       #129

    radeksgrl said:
    New member here, in desperate need of help. I have an HP Stream 11 with Windows 10. I didn't know about SSD before I bought it and didn't realize the SSD was only 32GB. It was an emergency purchase when my previous laptop (with HDD spinner) unexpectedly died and I needed something immediately. I've started getting "volume is too defragmented" errors when I try and do just about anything. And after hours of web surfing I found this post and thought it would fix things, but so far it hasn't worked for me.

    Using elevated Powershell (run as Admin), I ran Optimize-Volume -DriveLetter C -Analyze -Verbose and learned the SSD is 65% fragmented. So I ran the Optimize-Volume -DriveLetter C -Verbos, but nothing happened, it is still 65% fragmented. At this point I did confirm that trim is enabled on my laptop, NTFS DisableDeleteNotify = 0. So, then I ran Optimize-Volume -DriveLetter C -ReTrim -Verbose, and no success, it's still 65% fragmented. It does recommend to "defragment" this volume, but I didn't want to actually try using the D-word until I asked about it here (see attached picture).

    Lastly, I tried defrag /C /O, that didn't work either. Do you have any suggestions for what I could try next to get rid of this 65% fragmentation? Also, the 2.82GB free space I have is normal, I've been working with that amount of space (sometimes less) for years. I would greatly appreciate any help!!!
    Hello, and welcome to Ten Forums.

    Does it show the same using Optimize Drives from option one?
      My Computers


 

Tutorial Categories

Optimize and Defrag Drives in Windows 10 Tutorial Index Network & Sharing Instalation and Upgrade Browsers and Email General Tips Gaming Customization Apps and Features Virtualization BSOD System Security User Accounts Hardware and Drivers Updates and Activation Backup and Restore Performance and Maintenance Mixed Reality Phone


  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 18:54.
Find Us




Windows 10 Forums