Windows 10

You too can build a Windows 7 image…

…but why would you want to? I needed to do some testing on Windows 7 and needed an image of it with PowerShell 5.1 included. (PowerShell 2.0 is pretty ancient and lacks many features — it will drive you nuts if you’ve been working with PowerShell 5.1 for any period of time.) That doesn’t sound too hard, even if it is an unsupported OS.

So I started out with a Windows 7 Enterprise SP1 ISO downloaded from https://my.visualstudio.com. I imported the install.wim file into MDT (running the Windows 11 ADK), and then set out to add the Windows Management Framework (WMF) 5.1 package to it. That depends on .NET Framework 4.5 or higher, so that needs to be added as well. Weirdly, if you do only those two, the .NET Framework installation will fail and roll back. So it took a little more work than that.

Fortunately, Johan had written up a good starting point back in 2016, and it certainly felt like “back to the basics.” I took a different approach, but included most of the key updates:

As you can see, I explicitly put everything in the task sequence itself, using apps to install the individual pieces. Here’s a description of each one:

  • Update Certs. I added this one based on this post to address an 800B0109 error I was getting from the .NET Framework installer. (I added that prior to the rollup, so it’s possible that this might not be necessary — wasn’t worth the time to try again without it.)
  • KB3020369. This is a servicing stack update, a pre-req to the next update, installed using WUSA.EXE <file.msu> /quiet /norestart.
  • KB3125574. This is the big cumulative update released toward the end of Windows 7’s support lifecycle, also installed using WUSA.EXE <file.msu> /quiet norestart.
  • .NET Framework 4.8. This same package works for any OS, installed with <filename.exe> /passive /norestart.
  • WMF 5.1. This one (the x64 version is for Windows 7 and the matching server release) is installed with WUSA.EXE <file.msu> /quiet /norestart.

Run that task sequence via MDT and specify to capture and image and presto, you have a Windows 7 image that contains PowerShell 5.1. Sure, it’s missing other updates, but that wasn’t my immediate concern. (In theory the patches above would enable updates to be installed from WU or WSUS. I tried to do that initially using the built-in Windows Update actions in the task sequence, but that failed miserably, hence the manual approach.)

And if you’re curious, you can do the same thing with Windows 8.1 but the process there is simpler:

Since Windows 8.1 includes a supported .NET Framework version (4.5 I believe), you can just install WMF 5.1 using the same command (but different download from the same WMF download page), so much more straight-forward.

For those of you who have been using Windows 10 for years, you might not have experienced the pain of updating Windows 7 (and to an extent Windows 8.1 too) so that it was pre-patched. Be thankful. The rest of us have tried to shut it out of our minds, but it doesn’t take much to bring back flashbacks…

1 reply »

  1. KB4490628 SHA1 SSU + KB4474419 SHA2 support are enough to allow .NET 4.8 / WMF 5.1 to be installed
    maybe adding KB3172605 to permanently fix WU search

    you might also be interested to test those unkown-purpose semi-official pre-updated with .NET 4.7.1 Windows 7 ISOs
    x64
    http://go.microsoft.com/fwlink/?LinkID=2074309
    http://go.microsoft.com/fwlink/?LinkID=2074323
    x86
    http://go.microsoft.com/fwlink/?LinkID=2073890
    http://go.microsoft.com/fwlink/?LinkID=2037952

    Like

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s