optimize-volume error vs defrag working


  1. Posts : 14
    Win10
       #1

    optimize-volume error vs defrag working


    Good day.

    I hope someone can shed some light on this issue before having to resort to the in-place upgrade.

    Both the Optimize Drives Tool and the defrag C: /L command work perfectly.

    However, the Optimize-Volume -DriveLetter C -Analyze -Verbose or Optimize-Volume -DriveLetter C -ReTrim -Verbose cmdlets in powershell yield the following error:

    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : MetadataError: (MSFT_Volume:ROOT/Microsoft/...age/MSFT_Volume) [Optimize-Volume], CimExc
    eption
    + FullyQualifiedErrorId : HRESULT 0x80041031,Optimize-Volume

    An online search for this error points to checking the integrity of the WMI, which the standard tools show to be OK. Dism, sfc and chkdsk show no other problems either. I would certainly appreciate any input. Thank you for your attention.
    Last edited by justtesting; 18 Oct 2022 at 12:09.
      My Computer


  2. Posts : 43,010
    Win 10 Pro (22H2) (2nd PC is 22H2)
       #2

    Hi, scan thru this..
    https://learn.microsoft.com/en-us/an...valid-pro.html
    down to the bat script above

    SteveM-1699 · Dec 21 2021 at 3:17 PM

    Thanks MotoX80!
    The WMI was damaged.
    Running the above bat file and rebooting the system fixed the issue.
    Maybe that will help you.

    More if needed:
    https://social.technet.microsoft.com...einstallrepair
    windows 10 - Get-Net* PowerShell cmdlets failing with Invalid class - Super User
      My Computers


  3. Posts : 14
    Win10
    Thread Starter
       #3

    Thank you, dalchina.

    The re-creation of the WMI repository folder in safe mode worked.
    Thank you for your interest.
      My Computer


  4. Posts : 43,010
    Win 10 Pro (22H2) (2nd PC is 22H2)
       #4

      My Computers


 

  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 00:25.
Find Us




Windows 10 Forums