The default capture function in MDT does not add any description. It is not needed, but can be added by modifying ZTIBackup.wsf. In this case I added the Task Sequence Name, but you can add other things as will, like Task Sequence Description or Task Sequence version. I did this at a demo at Microsoft Ignite last week but I did not post it at that time, so here it is.
The Session from Ignite is here if you would like to see it: https://www.youtube.com/watch?v=H9HGSVEaqQk
The how:
Modifying the Script
Take a copy of ZTIBackup.wsf, open it in your favorite VBscript editor and look for this section:
At line 436 you will see this:
sCmd = " /Capture-Image /CaptureDir:" & oDrive.Path & " /ImageFile:""" & sBackupPath & """ /Name:""" & sPrefix & Left(oDrive.Path, 1) & "Drive"" /Compress:MAX /ConfigFile:""" & sWimScriptPath & """ /ScratchDir:""" & oUtility.LocalRootPath & "\Scratch"""
Change that to:
sCmd = " /Capture-Image /Description:""" & oEnvironment.Item("TaskSequenceName") & """ /CaptureDir:" & oDrive.Path & " /ImageFile:""" & sBackupPath & """ /Name:""" & sPrefix & Left(oDrive.Path, 1) & "Drive"" /Compress:MAX /ConfigFile:""" & sWimScriptPath & """ /ScratchDir:""" & oUtility.LocalRootPath & "\Scratch"""
(The yellow text shows the modification)
The result:
Using Get-WindowsImage will show you that the description is now set to the Task Sequence name:
If you import the WIM file into ConfigMgr you will also see the description set as well as the Comment:
/Mike
Categories: ConfigMgr, Ignite, MDT, OS Deployment, OSD
1 reply »