Home How To How to Unmount or Discard failed WIMs in bulk in Windows 10

How to Unmount or Discard failed WIMs in bulk in Windows 10

by Mohsin Raza
windows 10 wim

WIM or Windows Image is a file-based plate picture format that was created by Microsoft to send Windows. To comprehend it better, ISO or VHD are sector-based formats, while WIM is a file-based format for a circle. If you are implementing a great deal of WIM files on different PCs, and some of them fall flat, here is how to bulk descent or discard failed WIMs.

The motivation behind why WIM is useful is that its equipment independent, you can make them bootable using WIMBoot. Since Windows bootloader supports booting Windows from within a WIM file, it gets simpler to send.

How to Unmount or Discard a failed WIM

There are three different ways to descent or discard failed WIMs in bulk on a Windows framework:

  • PowerShell Registry way method
  • Using Dismount-WindowsImage method
  • Windows PowerShell 7 Parallel method

You can use any of these methods, yet the last one works with PowerShell 7 in particular.

1] Powershell Registry way method

Adam Gross, a Microsoft MVP, posted this method. You can use this method to find the area of all mounted pictures, extricate the discard status, and afterward get off every one of them.

Get-ChildItem - Path "HKLM:\SOFTWARE\Microsoft\WIMMount\Mounted Images" | Get-ItemProperty | Select - ExpandProperty "Mount Path" | ForEach-Object {Dismount-WindowsImage - Path $_ - Discard}

However, this will bulk get off discard failed WIMs individually in grouping and takes around 25 seconds each.

2] Dismount-WindowsImage method

It is a PowerShell order which can be used to discard or spare changes to a Windows picture and afterward get off it. So it’s about failed ones, yet additionally works for all. Best of all, it can spare the state if you are planning to unmount a WIM temporarily.

To Discard and descent

Descent WindowsImage

- Path <String>

[-Discard]

[-LogPath <String>]

[-ScratchDirectory <String>]

[-LogLevel <LogLevel>]

[<CommonParameters>]

To Save and Dismount

Descent WindowsImage

- Path <String>

[-Save]

[-CheckIntegrity]

[-Append]

[-LogPath <String>]

[-ScratchDirectory <String>]

[-LogLevel <LogLevel>]

[<CommonParameters>]

Test Command

Descent WindowsImage - Path "c:\offline" - Discard

Way: specifies the area of the mounted Windows picture.

Append: Location of an existing .wim file to add the Windows picture to when you get off it instead of overwriting the existing picture.

CheckIntegrity parameter identifies and tracks .wim file corruption.

So the final direction will now resemble (Thanks Manel) –

Also see: How to Fix Error with Event ID 7000, 7011, 7009 in Windows 10

3] Bulk get off discard failed WIMs using Windows PowerShell 7 Parallel method

PowerShell 7

It is accessible in review and will be accessible with PowerShell 7. According to Merlin, this new method got off three pictures in just shy of 10 seconds instead of very nearly 25 seconds when ran in a grouping.

Get-WindowsImage - Mounted | foreach - Parallel {Measure-Command {Dismount-WindowsImage - Discard - Path $_.Path}}

These are probably the best methods you can use to bulk descent or discard failed WIMs in one go.

While unmounting one doesn’t take a lot of time, yet this can be tremendous for Enterprise sending. The parallel switch will be a life savior for some, as it is 50% quicker contrasted with the successive method.

You may also like

Leave a Comment