Optimize drives based on media type (HDD/SSD)

Hello everyone,

The attached script will perform a defragmentation or TRIM operation on all of the drives attached to the system intelligently based on media type.

20181013-Optimize-Disks.json (2.31 KB)

@Kristan ,

We appreciate your input to the Comodo community. We’ll have our Script Developers review your provided procedure and share it with the rest. :smiley:

Hi @Kristan

Your Script works fine. We really appreciate your works and efforts. we already have a script for the disk defragmentation with the tool

kindly use our script repository

Thanks for being here as an active person.


Thank you for the kind words and I’m glad to be of help however I can.

I did make note of the defragmentation procedure that you mentioned prior to writing this, however the Auslogics Defrag tool used in that procedure mentioned attempts to perform a full defragmentation operation against SSDs which is not advised due to the additional wear and reduced life expectancy from the additional write operations.

With this procedure, the Windows built-in volume optimizer will only perform a TRIM operation on SSDs instead of a defragmentation, while providing standard defragmentation support for any rotational disks that may also be attached to the endpoint within a single procedure.