OSD

PowerShell Is King – Download ESD and Flip It to WIM

One thing I’ve discovered over the years is that we very often end up with the same request:

“I need the latest version of Windows 10 or Windows 11 — and I need the WIM file. (or sometimes a VHDX)”

You might need it to:

  • Import into your OSD solution (ConfigMgr, MDT, or something else)
  • Update an existing deployment with Windows 11 25H2
  • Convert it into a VHDX for lab or testing
  • Or simply keep your image library fresh and compliant

Different scenarios, same requirement, but hey, just “Give me a clean, updated WIM file.

The “Manual Download” Works…
But Automation Is King

Sure, you can download images manually:

  • Visual Studio subscriptions
  • Evaluation media
  • ISO downloads followed by extraction

That works. But let’s be honest — it’s not automation-friendly. And if there’s one thing we all agree on in this business, it’s this…Automation is King. :-) If we can’t automate it, it doesn’t scale. If it doesn’t scale, it becomes technical debt.

The Trick: ESD Files (Electronic Software Download)

Here’s the interesting part. Windows clients can:

  • Reset themselves
  • Reinstall
  • Upgrade in-place

Which means the installation media must exist somewhere.

And yes — that “somewhere” is ESD files.

What Is an ESD?

An ESD (Electronic Software Download) file is:

  • Similar to a WIM (Windows Imaging Format)
  • Highly compressed
  • Smaller than ISO or WIM files
  • Optimized for downloading Windows over the internet

Think of it as a diet WIM — smaller, tighter, but still very powerful.

Now imagine this:

What if we could find those ESDs,
download them automatically,
and convert them into proper WIM files?

Of course we can.
And of course we do it with PowerShell.

The Solution: PowerShell Toolkit for ESD → WIM

I’ve put together a small PowerShell toolkit that does exactly this:

  • Finds available ESD files
  • Downloads them
  • Converts them into WIM files ready for OSD

https://github.com/DeploymentBunny/Files/blob/master/Tools/Get-TSxWIMfileFromInternet/README.md

The README explains everything in detail, but let’s walk through it quickly.


Step 1: Update the ESD Catalogs

First, download and update the catalogs that describe available ESD files:

.\Update-TSxESDCatalogs.ps1

This gives us a local, searchable view of what Microsoft is offering.


Step 2: Browse and Filter Available ESD Files

Now let’s see what’s available.

Show-TSxESDFiles.ps1
You can also filter the output to find exactly what you need.
.\Show-TSxESDFiles.ps1 `
-Architecture amd64 `
-Version 22H2 `
-Language en-us `
-OSLicense Volume `
-OSName 'Windows 10'

This is where automation really shines — no guessing, no browsing web pages.


Step 3: Download the ESD

Once you’ve identified the right file, it’s time to download it:

.\Get-TSxESDDownload.ps1 `
-Url http://TheUrlToTheFile `
-FileName C:\Temp\esdfile.esd

Fast, scriptable, repeatable.


Step 4: Convert ESD to WIM

Finally, convert the ESD into a WIM file that your OSD solution actually wants:

.\Convert-TSxESDtoWIM.ps1 `
-EsdPath C:\Temp\esdfile.esd

And that’s it.

You now have: ✅ A proper WIM
✅ Built from official Microsoft sources
✅ Fully automated
✅ Ready for ConfigMgr, MDT, or whatever you’re running


Final Thoughts

I like it, my friends at work like, it and you might also like it :-)

Files/Tools/Get-TSxWIMfileFromInternet/README.md at master · DeploymentBunny/Files

You should find all you ned to know in the readme file, happy WIM:ing :-D

Just: PowerShell, Automation and Control

PowerShell is King 👑

Until next time,
/DeploymentBunny

Categories: OSD, PowerShell

Tagged as: , , , , , ,

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.