Check the Status.
dism /remount-wim /MountDir:<mountDir>
This command will recover an orphaned Wim mount directory.
dism /unmount-Wim /MountDir:<mountDir> /commit
Once you are done with Servicing the Wim Image, you can unmount the image from your machine.
The /Cleanup-Wim command is only used if there is any issue with the mount points, that means when any of the mounted images are shown as in the “Invalid” state. You can run the cleanup command to delete these abandoned resources at the corrupted mount points.