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
.