Defragmentation Error, The Volume (C:) was not Optimized

Solution 1:

After doing some research, I found out that Microsoft released a Hotfix for this issue.


Symptoms

When you run the Disk Defragmenter (Defrag.exe) utility on a volume on a computer that's running Windows 8.1 or Windows Server 2012 R2, the defrag operation fails. Additionally, event ID 257 is logged in the Application log. This event displays a "The parameter is incorrect" error message. In this case, you may be unable to optimize the volume for space efficiency.

Prerequisites

To apply this hotfix, you must be running one of the following operating systems:

  • Windows 8.1
  • Windows Server 2012 R2


from KB Article Number: 2929874

Solution 2:

It often results from an 'unusual' (such as ^ & or $ ) character in a file or folder names. Therefore, suggest you use the System File Checker

sfc /scannow

Which will take some time to complete.