Use PowerShell: https://learn.microsoft.com/en-us/powershell/module/configurationmanager/get-cmbootimage?view=sccm-ps. Each returned object from this cmdlet has a ReferencedDrivers attribute.
Extract Dirvers Name from Boot Image
Hello,
I am creating a new boot image. I need to add the drivers mentioned in the below image to new boot image.
How to extacct Driver Name, Vesion details from it. Please help.
4 answers
Sort by: Most helpful
-
Jason Sandys 31,166 Reputation points Microsoft Employee
2021-10-05T16:11:47.753+00:00 -
Amandayou-MSFT 11,046 Reputation points
2021-10-07T09:31:25.48+00:00 Haven't heard from you for some time, is Jason's answer helpful to you? If it is helpful, please accept answer. It will make someone who has the similar issue easily find the answer.
If you have any other issues, please don't hesitate to let us know.
Thanks and have a nice day.
If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread. -
Boopathi Subramaniam 3,196 Reputation points
2021-10-08T16:34:07.43+00:00 Hello @Amandayou-MSFT and @Jason Sandys ,
Thanks for your help.
I have used the below command to get the drives in the boot image. Because I cannot get the exact command using Get-CMBootImage to get the drivers in a boot image.
Dism /Get-Drivers /Image:D:\
I tried to use the "Copy-FBBootImageDrivers.ps1" from https://github.com/fredbainbridge/ConfigMgrScripts as per below URL .
https://fredbainbridge.com/2016/08/09/import-boot-image-drivers-from-existing-boot-image/
Steps provided in the above URL did not help.
-
Amandayou-MSFT 11,046 Reputation points
2021-10-11T08:22:14.437+00:00 Thank you for posting in Microsoft Q&A forum. I have discussed this issue with my collage, here is the solution.
Please try the simple script, note to change the "Set-Location -Path" to your site code, "$bimg_src" to your existing boot image name, "$bimg_dst" to your new boot image name.
Import-Module ($Env:SMS_ADMIN_UI_PATH.Substring(0,$Env:SMS_ADMIN_UI_PATH.Length-5) + '\ConfigurationManager.psd1') -Verbose:$false Set-Location -Path "PRI:" $bimg_src = "Boot image (x64)" $bimg_dst = "winpe" $BIdrivers = Get-CMBootImage -Name $bimg_src $BIdriverIDs = (Get-CMBootImage -Name $bimg_src).ReferencedDrivers.ID foreach ($ID in $BIdriverIDs) { $BIdrivers = Get-CMDriver -Id $ID foreach ($BIdriver in $BIdrivers) { #Set-CMDriverBootImage -SetDriveBootImageAction AddDriverToBootImage -DriverName "Adaptec Embedded SCSI HostRAID Controller" -BootImageName "Boot image (x64)" Set-CMDriverBootImage -SetDriveBootImageAction AddDriverToBootImage -DriverName $BIdriver.LocalizedDisplayName -BootImageName $bimg_dst } }
Here is the test screenshot:
If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.