MSEndpointMgr

Default Boot Images was not updated after a ConfigMgr 2012 R2 upgrade

If you’re upgrading to ConfigMgr 2012 R2 and have modified the default boot images, you’ll notice that the upgrade process was unable to update those boot images to the latest version (6.3.9600.16384). This happened today for me at a customer when we were upgrading the hierarchy. If you were not following along in the extremely wonderful ConfigMgrSetup.log (I wasn’t at that time), it’s easy to miss that the default boot images was not updated.
If you try to open one of them, let’s say for example the Boot image (x86), you’ll see that there’s a lot of tabs not being present as in the picture below:
83_1
Looking back in the ConfigMgrSetup.log, we can see that the default boot images indeed wasn’t updated:
83_3
How can we fix this problem then? Luckily for me I’ve run into this problem before when upgrading to ConfigMgr 2012 SP1 and I remembered that I’ve read a post about this and how to solve it.  This post by Clifton Hughes explains how to update the default boot images. Unfortunately it does not really reveal the all of the steps in detail, so I decided to outline them a bit more.

Update the Default Boot Images

Below is the steps that I did for both the x86 and x64 boot images.

x86

1. Open Windows Explorer and go to <ConfigMgr installation location>\OSD\boot\i386. In my lab environment that location is at D:\ConfigMgr\OSD\boot\i386.
2. Rename the boot.wim to boot.wim.bak and then rename the boot image named something like boot.CAS00002.wim (site boot image) to boot.CAS00002.wim.bak.
3. We now need to copy winpe.wim from the Windows ADK 8.1 installation location. The winpe.wim is located in the location below, if you’ve installed Windows ADK 8.1 in the default location:
C:\Program Files (x86)\Windows Kits\8.1\Assessment and Deployment Kit\Windows Preinstallation Environment\x86\en-us
4. Copy winpe.wim from the location above to <ConfigMgr installation location>\OSD\boot\i386.
5. Rename winpe.wim to boot.wim.
6. Copy and paste the newly renamed boot.wim into the same location. Rename it so that it reflects the boot image for the site, e.g. boot.CAS00002.wim.
83_4_1
7. Open an elevated PowerShell console and run the following command:

Get-WmiObject -Namespace "root\SMS\site_<site_code>" -Class "SMS_BootImagePackage" -Filter "PackageId='<PackageID>'" | Invoke-WmiMethod -Name UpdateDefaultImage

Note! Remember to change <site_code> and <PackageID> in the command to suit your environment. The PackageID can be found if you go the Software Library node, expand Operating Systems, select Boot Images and select the Boot image (x86). In the Image ID column you’ll find the PackageID value that should be used in the above PowerShell command. For your information, executing the command takes some time. You’ll get some output when the command has finished.

x64

1. Open Windows Explorer and go to <ConfigMgr installation location>\OSD\boot\x64. In my lab environment that location is at D:\ConfigMgr\OSD\boot\x64.
2. Rename the boot.wim to boot.wim.bak and then rename the boot image named something like boot.CAS00005.wim (site boot image) to boot.CAS00005.wim.bak.
3. We now need to copy winpe.wim from the Windows ADK 8.1 installation location. The winpe.wim is located in the location below, if you’ve installed Windows ADK 8.1 in the default location:
C:\Program Files (x86)\Windows Kits\8.1\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\en-us
4. Copy winpe.wim from the location above to <ConfigMgr installation location>\OSD\boot\x64.
5. Rename winpe.wim to boot.wim.
6. Copy and paste the newly renamed boot.wim into the same location. Rename it so that it reflects the boot image for the site, e.g. boot.CAS00005.wim.
83_5
7. Open an elevated PowerShell console and run the following command:

Get-WmiObject -Namespace "root\SMS\site_<site_code>" -Class "SMS_BootImagePackage" -Filter "PackageId='<PackageID>'" | Invoke-WmiMethod -Name UpdateDefaultImage

Note! Remember to change <site_code> and <PackageID> in the command to suit your environment. The PackageID can be found if you go the Software Library node, expand Operating Systems, select Boot Images and select the Boot image (x64). In the Image ID column you’ll find the PackageID value that should be used in the above PowerShell command. For your information, executing the command takes some time. You’ll get some output when the command has finished.
Once both of default boot images have been updated, you’re now able to see all the tabs again and make customizations to the images.
83_2

Nickolaj Andersen

Chief Technical Architect and Enterprise Mobility MVP since 2016. Nickolaj has been in the IT industry for the past 10 years specializing in Enterprise Mobility and Security, Windows devices and deployments including automation. Awarded as PowerShell Hero in 2015 by the community for his script and tools contributions. Creator of ConfigMgr Prerequisites Tool, ConfigMgr OSD FrontEnd, ConfigMgr WebService to name a few. Frequent speaker at conferences such as Microsoft Ignite, NIC Conference and IT/Dev Connections including nordic user groups.

10 comments

  • thanks Nikolaj, it helped me to resolve the defaul image issue. can u please tell how to update the MDT boot images? we have integrated MDT2012 with SCCM and using MDT images as a default boot image only for the OS deployment. thanks in advance.

  • Sample
    Get-WmiObject -Namespace “root\SMS\site_” -Class “SMS_BootImagePackage” -Filter “PackageId=”” | Invoke-WmiMethod -Name UpdateDefaultImage
    Get-WmiObject -Namespace “root\SMS\site_P02” -Class “SMS_BootImagePackage” -Filter “PackageId=’P0200003′” | Invoke-WmiMethod -Name UpdateDefaultImage
    Get-WmiObject -Namespace “root\SMS\site_P02” -Class “SMS_BootImagePackage” -Filter “PackageId=’P0200002′” | Invoke-WmiMethod -Name UpdateDefaultImage
    C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\en-us
    C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\x86\en-us
    E:\Program Files\Microsoft Configuration Manager\OSD\boot\i386
    E:\Program Files\Microsoft Configuration Manager\OSD\boot\x64
    Create boot.wim using a powershell script
    https://freshblog.azurewebsites.net/2015/08/13/create-and-import-windows-10-winpe-into-your-sccm-environment/

  • The reason the image doesnt update is because most of us have made changes to it (mainly adding drivers to support the computers we’re running it on) so why none of the guides anywhere tell you to remove them from the image before you upgrade I do not know!
    I have the same PS error as everyone else. I’ve updated the distribution points as suggested, get the error that you also get when doing this – but this changes nothing and I still cant run the powershell command.
    Nor can I remove the drivers from the image as the tabs to do so are missing and from what I can see the only way to get them back is follow the guide on this page so I’m just going around in circles banging my head on the wall each time I pass ‘Go’! I think I will just sit in Jail or Free Parking and have a cry and hope it just fixes itself…

  • Same problem as Paulo, but I removed all drivers out of the SCCM console (like Michael suggested) yet the error persists. How do you fix this?

  • I also had the same error as Paolo. I got round it another way.
    Instead of running the powershell script I tried to update distribution points from SCCM console. This produced the standard SCCM error of “failed to inject drivers”.
    Disabled Mcafee and updated distribution points again and this time it was successful

  • I solved the issue. I hope it’s the same issue you were having. Basically, the default boot image had some custom drivers injected into it. The packages containing those drivers were in a failed distribution state. After I corrected that, I was able to follow these instructions and didn’t receive the WMI error. I then ran into another small issue. When I tried to update distribution points with the updated boot image, I received an error but at least ConfigMgr told me what driver was the culprit. I cleaned that driver out of the boot image (and several other drivers that are unneeded in WinPE). This time when updating the content on the distribution points, everything was successful.

    • Hi Michael,
      Thanks for sharing your experience and the solution to your problem! Dealing with boot images can certainly be a pain in the *** sometimes.
      Regards,
      Nickolaj

  • I also get the same error as Paolo. It doesn’t seem to like Invoke-WmiMethod -Name UpdateDefaultImage
    Thanks
    Mark

  • Hi,
    I get this error when trying to run the command in PowerShell
    PS C:\Users\administrator.AUYKGW> Get-WmiObject -Namespace “root\SMS\site_YMP” -Class “SMS_BootImagePacka
    ckageId=’YMP00002′” | Invoke-WmiMethod -Name UpdateDefaultImage
    Invoke-WmiMethod : Generic failure
    At line:1 char:125
    + Get-WmiObject -Namespace “root\SMS\site_YMP” -Class “SMS_BootImagePackage” -Filter “PackageId=’YMP00002
    iMethod <<<< -Name UpdateDefaultImage
    + CategoryInfo : InvalidOperation: (:) [Invoke-WmiMethod], ManagementException
    + FullyQualifiedErrorId : InvokeWMIManagementException,Microsoft.PowerShell.Commands.InvokeWmiMethod

Sponsors