Error during Optimize-Volume (can't defrag a drive)
Added: 5/3/2017 8:00 PM
While trying to run Optimize-Volume from powershell, you may get an error. If you use -Verbose, you'll see that it successfully analyzes the volume and shows the details, but as soon as it hits 0%, it fails. Event Log errors: The volume (Z:) was not optimized because an error was encountered: The parameter is incorrect. (0x80070057) The volume (Z:) was not optimized because an error was encountered: Element not found. (0x80070490) To fix this, run these two commands from the command prompt (replace Z: with the drive letter you're trying to fix): fsutil usn deletejournal /D Z: fsutil usn createjournal m=1000 a=100 Z: I had this problem on a VHDX file, which seemed to work fine otherwise. After running the two above commands, I could immediately do the Optimize-Volume command without error.