Remember to maintain security and privacy. Do not share sensitive information. Procedimento.com.br may make mistakes. Verify important information. Termo de Responsabilidade
The Deployment Imaging Service and Management Tool (DISM) is a powerful utility in the Windows environment that allows administrators to service and prepare Windows images (.wim), virtual hard disks (.vhd or .vhdx), and even online Windows installations. DISM can be used to add, remove, and enumerate packages, drivers, features, and updates. It is an essential tool for IT professionals who need to manage and deploy Windows images efficiently.
In this article, we will explore how to use DISM for various tasks such as checking the health of an image, repairing a Windows image, and adding or removing features. Understanding how to use DISM can help maintain the integrity and performance of Windows installations, making it a crucial skill for any Systems Engineer specializing in Windows.
Examples:
Checking the Health of a Windows Image: To check the health of a Windows image, you can use the following DISM command:
DISM /Online /Cleanup-Image /CheckHealth
This command will quickly check for any corruption in the Windows image.
Repairing a Windows Image: If the image is found to be corrupted, you can use the following command to repair it:
DISM /Online /Cleanup-Image /RestoreHealth
This command will scan the image for corruption and repair it using Windows Update.
Adding a Feature to a Windows Image: To add a feature to a Windows image, use the following command:
DISM /Online /Enable-Feature /FeatureName:NetFx3 /All /LimitAccess /Source:D:\sources\sxs
In this example, the .NET Framework 3.5 is being added to the Windows image, with the source files located at D:\sources\sxs
.
Removing a Feature from a Windows Image: To remove a feature, use the following command:
DISM /Online /Disable-Feature /FeatureName:TelnetClient
This command will disable and remove the Telnet Client feature from the Windows image.
Mounting and Unmounting a Windows Image: You can mount a Windows image to a directory for servicing:
DISM /Mount-Wim /WimFile:C:\images\install.wim /Index:1 /MountDir:C:\mount
After servicing the image, unmount it and commit the changes:
DISM /Unmount-Wim /MountDir:C:\mount /Commit
Capturing a Windows Image: To capture a Windows image, use the following command:
DISM /Capture-Image /ImageFile:C:\images\newimage.wim /CaptureDir:C:\ /Name:"New Image"
This command captures the image of the C: drive and saves it as newimage.wim
.