4

Where is actually DISM /Cleanup-Image documented?

DISM /Cleanup-Image is mentioned in different pages e.g. https://learn.microsoft.com/de-de/windows-hardware/manufacture/desktop/repair-a-windows-image?view=windows-10.

But neither DISM /? (Version: 10.0.19041.1) nor DISM Image Management Command-Line Options show the option /Cleanup-Image.

wolfrevo
  • 317

2 Answers2

4

Since /Cleanup-Image is used for servicing the Component Store [%WinDir%\WinSxS], which is used both to store previous versions of updated components [Windows Update] and for repairing Windows, it's covered in different man pages depending on the use case.

  • Online image servicing is for a booted to %SystemDrive%, whereas offline image servicing is for a non-booted to %SystemDrive%, ESD, FFU, or WIM, and the online or offline state of an image will determine the second parameter of:
    Dism </Online | /Image:> /Cleanup-Image /?
    
    • /Online
      services a %SystemDrive% while booted to it
    • /Image:
      path to the Windows or Windows\WinSxS directory of a non-booted to %SystemDrive%, or a directory containing a mounted ESD/WIM/FFU [C:\Mount]


Dism [Deployment Image Servicing and Management], and it's command line options, do a myriad of things as the backbone of Windows image management and servicing, and depending on what Dism is being used for will determine the man page referenced:

JW0914
  • 9,096
1

Cleanup-Image is more like the name of the tool that you are telling DISM to use. It just means that you're intending to do clean and recover operations on the system.

It's the switches after Cleanup-Image that tell DISM how to use the Cleanup-Image tool.

harrymc
  • 498,455