<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
    <channel>
        <title>Windows-Image on Di</title>
        <link>https://dixu.ddns.net/tags/windows-image/</link>
        <description>Recent content in Windows-Image on Di</description>
        <generator>Hugo -- gohugo.io</generator>
        <language>en-us</language>
        <lastBuildDate>Thu, 24 Sep 2026 12:00:00 -0400</lastBuildDate><atom:link href="https://dixu.ddns.net/tags/windows-image/index.xml" rel="self" type="application/rss+xml" /><item>
            <title>Repair and Service Windows Images with DISM</title>
            <link>https://dixu.ddns.net/p/repair-and-service-windows-images-with-dism/</link>
            <pubDate>Fri, 30 Oct 2020 11:33:37 -0400</pubDate>
            <guid>https://dixu.ddns.net/p/repair-and-service-windows-images-with-dism/</guid>
            <description>&lt;p&gt;&lt;a class=&#34;link&#34; href=&#34;https://learn.microsoft.com/en-us/windows-hardware/manufacture/desktop/repair-a-windows-image?view=windows-11&#34;  title=&#34;Microsoft Learn&#34;&#xA;     target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;Repair a Windows Image&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;a class=&#34;link&#34; href=&#34;https://learn.microsoft.com/en-us/windows-hardware/manufacture/desktop/deployment-image-servicing-and-management--dism--command-line-options?view=windows-11&#34;  title=&#34;Microsoft Learn&#34;&#xA;     target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;DISM Command-Line Options&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;a class=&#34;link&#34; href=&#34;https://support.microsoft.com/en-us/windows/experience/backup-recovery/using-system-file-checker-in-windows&#34;  title=&#34;Microsoft Support&#34;&#xA;     target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;Use System File Checker&lt;/a&gt;&lt;/p&gt;&#xA;&lt;h2 id=&#34;before-you-start&#34;&gt;Before You Start&#xA;&lt;/h2&gt;&lt;p&gt;Deployment Image Servicing and Management, or DISM, can repair the running Windows component store and service offline Windows images. In DISM terminology:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;code&gt;/Online&lt;/code&gt; targets the Windows installation that is currently running.&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;/Image:C:\Mount&lt;/code&gt; targets an offline Windows installation whose root is mounted at &lt;code&gt;C:\Mount&lt;/code&gt;.&lt;/li&gt;&#xA;&lt;li&gt;Image-management commands such as &lt;code&gt;/Mount-Image&lt;/code&gt; operate on a WIM, VHD, VHDX, or FFU file rather than using &lt;code&gt;/Online&lt;/code&gt;.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Open &lt;strong&gt;Windows Terminal&lt;/strong&gt;, &lt;strong&gt;PowerShell&lt;/strong&gt;, or &lt;strong&gt;Command Prompt&lt;/strong&gt; as an administrator. Back up important data before modifying an offline image, drivers, features, or Windows edition. Do not interrupt DISM while it is committing an image.&lt;/p&gt;&#xA;&lt;p&gt;DISM records servicing details in &lt;code&gt;C:\Windows\Logs\DISM\dism.log&lt;/code&gt;. System File Checker writes details to &lt;code&gt;C:\Windows\Logs\CBS\CBS.log&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;h2 id=&#34;repair-the-running-windows-installation&#34;&gt;Repair the Running Windows Installation&#xA;&lt;/h2&gt;&lt;p&gt;Install available Windows updates and restart first. Then open an elevated terminal.&lt;/p&gt;&#xA;&lt;p&gt;Check whether Windows has already marked the component store as damaged:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-cmd&#34; data-lang=&#34;cmd&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;DISM.exe /Online /Cleanup-Image /CheckHealth&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;code&gt;/CheckHealth&lt;/code&gt; reads the existing corruption flag; it does not perform a new scan. Run a complete scan when the quick check reports damage or Windows is behaving unexpectedly:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-cmd&#34; data-lang=&#34;cmd&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;DISM.exe /Online /Cleanup-Image /ScanHealth&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Repair the component store. Without &lt;code&gt;/Source&lt;/code&gt;, DISM uses the repair source defined by policy and can contact Windows Update:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-cmd&#34; data-lang=&#34;cmd&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;DISM.exe /Online /Cleanup-Image /RestoreHealth&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;After DISM completes successfully, repair protected system files from the restored component store:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-cmd&#34; data-lang=&#34;cmd&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;sfc.exe /scannow&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Microsoft recommends running DISM before SFC. Wait until each command finishes; apparent pauses at one percentage do not necessarily mean that the process has stopped.&lt;/p&gt;&#xA;&lt;p&gt;Restart Windows after repairs, then verify the component store again:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-cmd&#34; data-lang=&#34;cmd&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;DISM.exe /Online /Cleanup-Image /CheckHealth&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;repair-from-matching-installation-media&#34;&gt;Repair from Matching Installation Media&#xA;&lt;/h2&gt;&lt;p&gt;Use a local source when Windows Update is unavailable or DISM reports that source files could not be found. The installation media must match the installed Windows architecture, language, edition, and release. A source older than the installed servicing level might not contain the required components.&lt;/p&gt;&#xA;&lt;p&gt;Mount the Windows ISO. The examples below assume that it appears as drive &lt;code&gt;D:&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;p&gt;Determine whether the media contains &lt;code&gt;install.wim&lt;/code&gt; or &lt;code&gt;install.esd&lt;/code&gt;:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-cmd&#34; data-lang=&#34;cmd&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;dir&lt;/span&gt; D:\sources\install.*&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;List the editions and indexes in a WIM:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-cmd&#34; data-lang=&#34;cmd&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;DISM.exe /Get-WimInfo /WimFile:D:\sources\install.wim&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Use the index that matches the installed edition. The following example uses index &lt;code&gt;6&lt;/code&gt;; replace it with the value reported for your media:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-cmd&#34; data-lang=&#34;cmd&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;DISM.exe /Online /Cleanup-Image /RestoreHealth /Source:wim:D:\sources\install.wim:6 /LimitAccess&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;For media containing an ESD, inspect and use it instead:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-cmd&#34; data-lang=&#34;cmd&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;DISM.exe /Get-WimInfo /WimFile:D:\sources\install.esd&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;DISM.exe /Online /Cleanup-Image /RestoreHealth /Source:esd:D:\sources\install.esd:6 /LimitAccess&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;code&gt;/LimitAccess&lt;/code&gt; prevents DISM from contacting Windows Update. Omit it only when Windows Update should remain available as a fallback source.&lt;/p&gt;&#xA;&lt;p&gt;Run SFC after the source-based repair succeeds:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-cmd&#34; data-lang=&#34;cmd&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;sfc.exe /scannow&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;analyze-and-clean-the-component-store&#34;&gt;Analyze and Clean the Component Store&#xA;&lt;/h2&gt;&lt;p&gt;Analyze the WinSxS component store before deciding whether cleanup is useful:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-cmd&#34; data-lang=&#34;cmd&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;DISM.exe /Online /Cleanup-Image /AnalyzeComponentStore&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Remove superseded component versions:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-cmd&#34; data-lang=&#34;cmd&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;DISM.exe /Online /Cleanup-Image /StartComponentCleanup&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Do not manually delete files from &lt;code&gt;C:\Windows\WinSxS&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;p&gt;DISM also supports the more aggressive &lt;code&gt;/ResetBase&lt;/code&gt; option:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-cmd&#34; data-lang=&#34;cmd&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;DISM.exe /Online /Cleanup-Image /StartComponentCleanup /ResetBase&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;After &lt;code&gt;/ResetBase&lt;/code&gt; completes, installed update packages incorporated into the new base cannot be uninstalled. Use it only after the system and its updates have been tested and rollback is no longer required.&lt;/p&gt;&#xA;&lt;h2 id=&#34;manage-optional-windows-features&#34;&gt;Manage Optional Windows Features&#xA;&lt;/h2&gt;&lt;p&gt;List feature names and their states:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-cmd&#34; data-lang=&#34;cmd&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;DISM.exe /Online /Get-Features /Format:Table&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Inspect one feature before changing it:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-cmd&#34; data-lang=&#34;cmd&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;DISM.exe /Online /Get-FeatureInfo /FeatureName:Microsoft-Hyper-V-All&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Enable a feature and all required parent features without restarting automatically:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-cmd&#34; data-lang=&#34;cmd&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;DISM.exe /Online /Enable-Feature /FeatureName:Microsoft-Hyper-V-All /All /NoRestart&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Disable a feature while retaining its payload:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-cmd&#34; data-lang=&#34;cmd&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;DISM.exe /Online /Disable-Feature /FeatureName:Microsoft-Hyper-V-All /NoRestart&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Feature availability depends on the Windows edition and hardware. Review the command result and restart when DISM reports that a reboot is required. Adding &lt;code&gt;/Remove&lt;/code&gt; to &lt;code&gt;/Disable-Feature&lt;/code&gt; removes the feature payload and can require a matching source when the feature is enabled again.&lt;/p&gt;&#xA;&lt;h2 id=&#34;check-windows-edition-information&#34;&gt;Check Windows Edition Information&#xA;&lt;/h2&gt;&lt;p&gt;Display the current edition identifier:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-cmd&#34; data-lang=&#34;cmd&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;DISM.exe /Online /Get-CurrentEdition&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Display supported target editions:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-cmd&#34; data-lang=&#34;cmd&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;DISM.exe /Online /Get-TargetEditions&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;code&gt;/Set-Edition&lt;/code&gt; is not a general downgrade or cross-family conversion tool. Microsoft documents online edition conversion with DISM for supported Windows Server paths. Confirm that the target appears in &lt;code&gt;/Get-TargetEditions&lt;/code&gt;, obtain a valid key, review the license terms, and follow Microsoft&amp;rsquo;s &lt;a class=&#34;link&#34; href=&#34;https://learn.microsoft.com/en-us/windows-server/get-started/upgrade-conversion-options&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;Windows Server conversion guidance&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;For a supported Server Standard-to-Datacenter conversion, the command has this form:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-cmd&#34; data-lang=&#34;cmd&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;DISM.exe /Online /Set-Edition:ServerDatacenter /ProductKey:&lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;product-key&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt; /AcceptEula&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Replace &lt;code&gt;&amp;lt;product-key&amp;gt;&lt;/code&gt; with the valid key without publishing it in documentation, scripts, or logs. Edition conversion can require a restart and cannot be used to convert an Active Directory domain controller from an evaluation edition to retail.&lt;/p&gt;&#xA;&lt;h2 id=&#34;export-third-party-drivers&#34;&gt;Export Third-Party Drivers&#xA;&lt;/h2&gt;&lt;p&gt;Create a destination and export the third-party INF driver packages from the running installation:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-cmd&#34; data-lang=&#34;cmd&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;mkdir&lt;/span&gt; C:\DriversBackup&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;DISM.exe /Online /Export-Driver /Destination:C:\DriversBackup&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The export contains INF-style driver packages. It does not back up vendor installers, control applications, firmware tools, or every device-specific setting. Copy the result to separate storage and test it before relying on it for recovery.&lt;/p&gt;&#xA;&lt;p&gt;List third-party drivers installed in the running system:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-cmd&#34; data-lang=&#34;cmd&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;DISM.exe /Online /Get-Drivers /Format:Table&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;DISM supports &lt;code&gt;/Add-Driver&lt;/code&gt; for offline Windows images, not for the running installation. Use Windows Update, Device Manager, or the vendor&amp;rsquo;s supported installer to add a driver to the current operating system.&lt;/p&gt;&#xA;&lt;h2 id=&#34;mount-and-service-an-offline-wim&#34;&gt;Mount and Service an Offline WIM&#xA;&lt;/h2&gt;&lt;p&gt;These examples assume that a Windows ISO is mounted as &lt;code&gt;D:&lt;/code&gt;, the writable image will be stored in &lt;code&gt;C:\Images&lt;/code&gt;, and the empty mount directory is &lt;code&gt;C:\Mount&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;p&gt;Create the working directories, copy the WIM from the read-only ISO, and remove its read-only attribute:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-cmd&#34; data-lang=&#34;cmd&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;mkdir&lt;/span&gt; C:\Images&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;mkdir&lt;/span&gt; C:\Mount&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;copy&lt;/span&gt; D:\sources\install.wim C:\Images\install.wim&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;attrib -r C:\Images\install.wim&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;List the available indexes:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-cmd&#34; data-lang=&#34;cmd&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;DISM.exe /Get-WimInfo /WimFile:C:\Images\install.wim&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Mount the required index. This example uses index &lt;code&gt;6&lt;/code&gt;; replace it with the correct index:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-cmd&#34; data-lang=&#34;cmd&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;DISM.exe /Mount-Image /ImageFile:C:\Images\install.wim /Index:6 /MountDir:C:\Mount /CheckIntegrity&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Query the mounted image:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-cmd&#34; data-lang=&#34;cmd&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;DISM.exe /Image:C:\Mount /Get-CurrentEdition&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;DISM.exe /Image:C:\Mount /Get-Features /Format:Table&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;DISM.exe /Image:C:\Mount /Get-Drivers /Format:Table&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Add signed INF drivers from a directory and its subdirectories:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-cmd&#34; data-lang=&#34;cmd&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;DISM.exe /Image:C:\Mount /Add-Driver /Driver:C:\DriversBackup /Recurse&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Review the warnings. &lt;code&gt;/Recurse&lt;/code&gt; can add unnecessary drivers and increase the image size. Do not use &lt;code&gt;/ForceUnsigned&lt;/code&gt; for a production image.&lt;/p&gt;&#xA;&lt;p&gt;Commit the changes and unmount the image:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-cmd&#34; data-lang=&#34;cmd&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;DISM.exe /Unmount-Image /MountDir:C:\Mount /Commit /CheckIntegrity&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;To abandon all changes instead:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-cmd&#34; data-lang=&#34;cmd&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;DISM.exe /Unmount-Image /MountDir:C:\Mount /Discard&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Always choose either &lt;code&gt;/Commit&lt;/code&gt; or &lt;code&gt;/Discard&lt;/code&gt;. Back up the original WIM before servicing it and keep enough free disk space for the mount and commit operations.&lt;/p&gt;&#xA;&lt;h2 id=&#34;repair-an-offline-windows-installation&#34;&gt;Repair an Offline Windows Installation&#xA;&lt;/h2&gt;&lt;p&gt;In Windows Recovery Environment or Windows PE, drive letters can differ from normal Windows. Locate the offline installation before running repair commands:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-cmd&#34; data-lang=&#34;cmd&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;dir&lt;/span&gt; C:\Windows&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;dir&lt;/span&gt; D:\Windows&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;If the offline Windows directory is &lt;code&gt;D:\Windows&lt;/code&gt;, target its volume root:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-cmd&#34; data-lang=&#34;cmd&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;DISM.exe /Image:D:\ /Cleanup-Image /CheckHealth&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;DISM.exe /Image:D:\ /Cleanup-Image /ScanHealth&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;DISM.exe /Image:D:\ /Cleanup-Image /RestoreHealth /Source:E:\RepairSource\Windows /LimitAccess&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Replace both drive letters with the paths shown in the recovery environment. The repair source must match the offline operating system.&lt;/p&gt;&#xA;&lt;p&gt;&lt;code&gt;/RevertPendingActions&lt;/code&gt; exists for recovery from a boot failure caused by an incomplete servicing operation. It is unsupported against the running operating system and should be used only after diagnosing that specific recovery scenario.&lt;/p&gt;&#xA;&lt;h2 id=&#34;capture-and-append-a-wim-image&#34;&gt;Capture and Append a WIM Image&#xA;&lt;/h2&gt;&lt;p&gt;For deployment imaging, prepare the reference installation with Sysprep as required by the deployment plan, boot another operating system such as Windows PE, and capture the offline Windows volume. Do not capture an actively running system volume as a deployment image.&lt;/p&gt;&#xA;&lt;p&gt;Capture the prepared &lt;code&gt;C:&lt;/code&gt; volume to another drive:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-cmd&#34; data-lang=&#34;cmd&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;DISM.exe /Capture-Image /ImageFile:D:\Images\Windows11.wim /CaptureDir:C:\ /Name:&lt;span class=&#34;s2&#34;&gt;&amp;#34;Windows 11 Pro&amp;#34;&lt;/span&gt; /Description:&lt;span class=&#34;s2&#34;&gt;&amp;#34;Reference image&amp;#34;&lt;/span&gt; /Compress:Max /CheckIntegrity /Verify&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Append another prepared image to the existing WIM:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-cmd&#34; data-lang=&#34;cmd&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;DISM.exe /Append-Image /ImageFile:D:\Images\Windows11.wim /CaptureDir:C:\ /Name:&lt;span class=&#34;s2&#34;&gt;&amp;#34;Windows 11 Enterprise&amp;#34;&lt;/span&gt; /Description:&lt;span class=&#34;s2&#34;&gt;&amp;#34;Reference image&amp;#34;&lt;/span&gt; /CheckIntegrity /Verify&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The appended image must use the compression type already assigned to the WIM. Ensure that the destination has enough free space; running out of space during an append can corrupt the image.&lt;/p&gt;&#xA;&lt;p&gt;Verify the resulting image indexes:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-cmd&#34; data-lang=&#34;cmd&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;DISM.exe /Get-WimInfo /WimFile:D:\Images\Windows11.wim&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;recover-a-stale-mount&#34;&gt;Recover a Stale Mount&#xA;&lt;/h2&gt;&lt;p&gt;List known mount points first:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-cmd&#34; data-lang=&#34;cmd&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;DISM.exe /Get-MountedImageInfo&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Try to recover an image whose mount directory became inaccessible:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-cmd&#34; data-lang=&#34;cmd&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;DISM.exe /Remount-Image /MountDir:C:\Mount&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Use &lt;code&gt;/Cleanup-Mountpoints&lt;/code&gt; only for corrupted mount resources that cannot be recovered or normally unmounted:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-cmd&#34; data-lang=&#34;cmd&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;DISM.exe /Cleanup-Mountpoints&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Cleanup does not commit image changes. Confirm that no recoverable mount contains work that still needs to be saved.&lt;/p&gt;&#xA;&lt;h2 id=&#34;troubleshooting&#34;&gt;Troubleshooting&#xA;&lt;/h2&gt;&lt;h3 id=&#34;dism-reports-that-source-files-could-not-be-found&#34;&gt;DISM Reports That Source Files Could Not Be Found&#xA;&lt;/h3&gt;&lt;ul&gt;&#xA;&lt;li&gt;Verify the ISO&amp;rsquo;s Windows release, architecture, language, edition, and servicing level.&lt;/li&gt;&#xA;&lt;li&gt;Confirm whether the media contains &lt;code&gt;install.wim&lt;/code&gt; or &lt;code&gt;install.esd&lt;/code&gt;.&lt;/li&gt;&#xA;&lt;li&gt;Use &lt;code&gt;/Get-WimInfo&lt;/code&gt; and select the correct image index.&lt;/li&gt;&#xA;&lt;li&gt;Remove &lt;code&gt;/LimitAccess&lt;/code&gt; if policy permits Windows Update to supply missing repair content.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h3 id=&#34;dism-reports-a-pending-restart&#34;&gt;DISM Reports a Pending Restart&#xA;&lt;/h3&gt;&lt;p&gt;Finish installing updates and restart Windows before retrying. Do not delete servicing registry keys or pending-operation files to bypass the requirement.&lt;/p&gt;&#xA;&lt;h3 id=&#34;review-the-logs&#34;&gt;Review the Logs&#xA;&lt;/h3&gt;&lt;p&gt;Display recent DISM errors in PowerShell:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-powershell&#34; data-lang=&#34;powershell&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nb&#34;&gt;Select-String&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;-Path&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$env:windir&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;\Logs\DISM\dism.log&amp;#34;&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;-Pattern&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;Error&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;Failed&amp;#39;&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;|&lt;/span&gt; &lt;span class=&#34;nb&#34;&gt;Select-Object&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;-Last&lt;/span&gt; &lt;span class=&#34;mf&#34;&gt;50&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Extract recent SFC entries from the CBS log:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-cmd&#34; data-lang=&#34;cmd&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;findstr.exe /c:&lt;span class=&#34;s2&#34;&gt;&amp;#34;[SR]&amp;#34;&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;%windir%&lt;/span&gt;\Logs\CBS\CBS.log &lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;%USERPROFILE%&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;\Desktop\SFC-details.txt&amp;#34;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Review the surrounding log context before acting on an isolated error line. If repairs repeatedly fail with matching media, check storage health, memory stability, update history, and the exact error code before attempting more invasive recovery.&lt;/p&gt;&#xA;</description>
        </item></channel>
</rss>
