The parameters of Dism commands are an almost 1:1 to the parameters of PowerShell's Dism cmdlets, with the main difference being cmdlets use - instead of /, coupled with some additional paraemeters, such as -ScratchDirectory, being supported for Package Servicing.
The man page for the equivalent Dism cmdlets is Use DISM in Windows PowerShell, which links to cmdlet Repair-WindowsImage:
Correct Repair-WindowsImage command: (-ScratchDirectory not required)
Repair-WindowsImage -Path $mounted_image -StartComponentCleanup -ResetBase -ScratchDirectory $scratch_dir
- If running against an online Windows image [
%SystemDrive% | $env:SystemDrive], -Online is used in lieu of -Path, however one or the other must be specified:
-Online: services packages of an online [booted to] Windows image
e.g. Dism /Online
-Path: services packages of an offline [non-booted to] Windows image
e.g. Dism /Image:<path>