Optimize and Defrag Drives in Windows 10  

Page 15 of 16 FirstFirst ... 513141516 LastLast

  1. Posts : 24
    Windows 10
       #140

    Optimizer report in TXT


    Good people, how are you? Is it possible to use this command "Optimize-Volume -DriveLetter C -Verbose" but creating the report file type (.txt)? Something like this:

    Optimize-Volume -DriveLetter C -Verbose | Out-File -Filepath "Optimize-VolumeSystemDrive.txt" using powershell command or script (.ps1)?
      My Computer


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

    Hello @Underthaker,

    I just had a quick look for you but there doesn't seem to be an option for output . . .

    Code:
    
    Get-Help Optimize-Volume -Full
      My Computer


  3. Posts : 16,962
    Windows 10 Home x64 Version 22H2 Build 19045.4170
       #142

    Underthaker said:
    Is it possible to use this command "Optimize-Volume -DriveLetter C -Verbose" but creating the report file type (.txt)? Something like this:
    Optimize-Volume -DriveLetter C -Verbose | Out-File -Filepath "Optimize-VolumeSystemDrive.txt" using powershell command or script (.ps1)?
    The command will run defrag, will not cause an error & will create an empty output file.

    Denis
      My Computer


  4. Posts : 16,962
    Windows 10 Home x64 Version 22H2 Build 19045.4170
       #143

    I don't know what you want to keep defrag records for but if doing so is important to you then use the cmd version instead of PS e.g.
    Code:
    defrag.exe C: -O -H >"F:\Wherever\Defrag.Log"
    defrag - TenForumsTutorials
    Defrag - SS64
    defrag - MSDocs (MSLearn)


    Thanks for the rep,
    Denis
      My Computer


  5. Posts : 24
    Windows 10
       #144

    Optimize Drives


    Thank you for helping me out in every way.
      My Computer


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

    Hello @Brink,

    There are a few new switch parameters to OPTION TWO - To Optimize Drives in Command Prompt that could now be added to the parameters list.

    If documented, they should show up if you run defrag in CMD Prompt.

    Code:
    
    Switch	Description
    
    /F      Forces defragmentation of the volume when free space is low.
    /R      Performs partial defragmentation (default).
            Attempts to consolidate only fragments smaller than 64 megabytes (MB).
    /W      Performs full defragmentation. 
            Attempts to consolidate all file fragments, regardless of their files & fragments size.

    I hope this helps.
      My Computer


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

    Paul Black said:
    Hello @Brink,

    There are a few new switch parameters to OPTION TWO - To Optimize Drives in Command Prompt that could now be added to the parameters list.

    If documented, they should show up if you run defrag in CMD Prompt.

    Code:
    
    Switch	Description
    
    /F      Forces defragmentation of the volume when free space is low.
    /R      Performs partial defragmentation (default).
            Attempts to consolidate only fragments smaller than 64 megabytes (MB).
    /W      Performs full defragmentation. 
            Attempts to consolidate all file fragments, regardless of their files & fragments size.

    I hope this helps.
    Thank you Paul. Where did you see this from?

    I'm not seeing the new parameters listed in the command prompt.
      My Computers


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

    Apologies @Brink,

    On investigation, this appears to be Win 7 related.

    The strange thing is, that although those command line commands are valid, they do NOT show in the Win 7 list either. Here is just one site I looked at > Free to Defragment Hard Drive with Command Prompt or Powershell
      My Computer


  9. Posts : 68,995
    64-bit Windows 11 Pro for Workstations
    Thread Starter
       #148

    Paul Black said:
    Apologies @Brink,

    On investigation, this appears to be Win 7 related.

    The strange thing is, that although those command line commands are valid, they do NOT show in the Win 7 list either. Here is just one site I looked at > Free to Defragment Hard Drive with Command Prompt or Powershell
    No apologies needed. Makes you wonder why it's not in any reference material from Microsoft unless deprecated.
      My Computers


  10. Posts : 16,962
    Windows 10 Home x64 Version 22H2 Build 19045.4170
       #149

    I think those were Vista switches.
    See What does this defrag switch do - TechNet

    I've seen them mentioned before but whether it was here or SevenForums I do not remember.
    I never saw any report that anybody had tried them and that they had any real effect in Ten or in Seven.

    The 64MB limit was added to defrag with the advent of Windows 7 so it became redundant then. That /r switch in Vista indicates that it had been added earlier as an experiment.
    Disk Defragmentation - Background and Engineering the Windows 7 Improvements - MSLearn


    All the best,
    Denis
      My Computer


 

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 09:16.
Find Us




Windows 10 Forums